mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
chore: update paths 🧼 (#820)
This commit is contained in:
parent
4589a19e03
commit
85950f104a
@ -1,23 +1,32 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
import { disableFeatureStrategiesProductionGuard } from '../../../src/component/feature/FeatureStrategy/FeatureStrategyProdGuard/FeatureStrategyProdGuard';
|
||||
import { activeSplashIds } from '../../../src/component/splash/splash';
|
||||
export {};
|
||||
|
||||
const AUTH_USER = Cypress.env('AUTH_USER');
|
||||
const AUTH_PASSWORD = Cypress.env('AUTH_PASSWORD');
|
||||
const ENTERPRISE = Boolean(Cypress.env('ENTERPRISE'));
|
||||
const randomId = String(Math.random()).split('.')[1];
|
||||
const featureToggleName = `unleash-e2e-${randomId}`;
|
||||
const baseUrl = Cypress.config().baseUrl;
|
||||
let strategyId = '';
|
||||
|
||||
const AUTH_USER = Cypress.env('AUTH_USER');
|
||||
const AUTH_PASSWORD = Cypress.env('AUTH_PASSWORD');
|
||||
const ENTERPRISE = Boolean(Cypress.env('ENTERPRISE'));
|
||||
// Disable the prod guard modal by marking it as seen.
|
||||
const disableFeatureStrategiesProdGuard = () => {
|
||||
localStorage.setItem(
|
||||
'useFeatureStrategyProdGuardSettings:v2',
|
||||
JSON.stringify({ hide: true })
|
||||
);
|
||||
};
|
||||
|
||||
// Disable all active splash pages by visiting them.
|
||||
const disableActiveSplashScreens = () => {
|
||||
cy.visit(`/splash/operators`);
|
||||
};
|
||||
|
||||
describe('feature', () => {
|
||||
before(() => {
|
||||
// Visit all splash pages to mark them as seen.
|
||||
activeSplashIds.forEach(splashId => {
|
||||
cy.visit(`/splash/${splashId}`);
|
||||
});
|
||||
disableFeatureStrategiesProdGuard();
|
||||
disableActiveSplashScreens();
|
||||
});
|
||||
|
||||
after(() => {
|
||||
@ -32,7 +41,6 @@ describe('feature', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
disableFeatureStrategiesProductionGuard();
|
||||
cy.visit('/');
|
||||
cy.get('[data-test="LOGIN_EMAIL_ID"]').type(AUTH_USER);
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
import ConditionallyRender from './common/ConditionallyRender';
|
||||
import Feedback from './common/Feedback/Feedback';
|
||||
import LayoutPicker from './layout/LayoutPicker/LayoutPicker';
|
||||
import Loader from './common/Loader/Loader';
|
||||
import NotFound from './common/NotFound/NotFound';
|
||||
import ProtectedRoute from './common/ProtectedRoute/ProtectedRoute';
|
||||
import SWRProvider from './providers/SWRProvider/SWRProvider';
|
||||
import ToastRenderer from './common/ToastRenderer/ToastRenderer';
|
||||
import styles from './styles.module.scss';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import Feedback from 'component/common/Feedback/Feedback';
|
||||
import LayoutPicker from 'component/layout/LayoutPicker/LayoutPicker';
|
||||
import Loader from 'component/common/Loader/Loader';
|
||||
import NotFound from 'component/common/NotFound/NotFound';
|
||||
import ProtectedRoute from 'component/common/ProtectedRoute/ProtectedRoute';
|
||||
import SWRProvider from 'component/providers/SWRProvider/SWRProvider';
|
||||
import ToastRenderer from 'component/common/ToastRenderer/ToastRenderer';
|
||||
import styles from 'component/styles.module.scss';
|
||||
import { Redirect, Route, Switch } from 'react-router-dom';
|
||||
import { routes } from './menu/routes';
|
||||
import { routes } from 'component/menu/routes';
|
||||
import { useAuthDetails } from 'hooks/api/getters/useAuth/useAuthDetails';
|
||||
import { useAuthUser } from 'hooks/api/getters/useAuth/useAuthUser';
|
||||
import { SplashPageRedirect } from 'component/splash/SplashPageRedirect/SplashPageRedirect';
|
||||
|
@ -2,10 +2,10 @@ import classnames from 'classnames';
|
||||
import { Paper } from '@material-ui/core';
|
||||
import CheckIcon from '@material-ui/icons/Check';
|
||||
import ReportProblemOutlinedIcon from '@material-ui/icons/ReportProblemOutlined';
|
||||
import ConditionallyRender from '../../common/ConditionallyRender/ConditionallyRender';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import styles from './ReportCard.module.scss';
|
||||
import ReactTimeAgo from 'react-timeago';
|
||||
import { IProjectHealthReport } from '../../../interfaces/project';
|
||||
import { IProjectHealthReport } from 'interfaces/project';
|
||||
|
||||
interface IReportCardProps {
|
||||
healthReport: IProjectHealthReport;
|
||||
|
@ -3,8 +3,8 @@ import { Paper, MenuItem } from '@material-ui/core';
|
||||
import PropTypes from 'prop-types';
|
||||
import ReportToggleListItem from './ReportToggleListItem/ReportToggleListItem';
|
||||
import ReportToggleListHeader from './ReportToggleListHeader/ReportToggleListHeader';
|
||||
import ConditionallyRender from '../../common/ConditionallyRender/ConditionallyRender';
|
||||
import DropdownMenu from '../../common/DropdownMenu/DropdownMenu';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import DropdownMenu from 'component/common/DropdownMenu/DropdownMenu';
|
||||
import {
|
||||
getObjectProperties,
|
||||
getCheckedState,
|
||||
|
@ -2,11 +2,14 @@ import React from 'react';
|
||||
import { Checkbox } from '@material-ui/core';
|
||||
import UnfoldMoreOutlinedIcon from '@material-ui/icons/UnfoldMoreOutlined';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import ConditionallyRender from '../../../common/ConditionallyRender/ConditionallyRender';
|
||||
|
||||
import { NAME, LAST_SEEN, CREATED, EXPIRED, STATUS } from '../../constants';
|
||||
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import {
|
||||
NAME,
|
||||
LAST_SEEN,
|
||||
CREATED,
|
||||
EXPIRED,
|
||||
STATUS,
|
||||
} from 'component/Reporting/constants';
|
||||
import { useStyles } from '../ReportToggleList.styles';
|
||||
|
||||
const ReportToggleListHeader = ({
|
||||
|
@ -2,27 +2,21 @@ import React from 'react';
|
||||
import classnames from 'classnames';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { Checkbox } from '@material-ui/core';
|
||||
import CheckIcon from '@material-ui/icons/Check';
|
||||
import ReportProblemOutlinedIcon from '@material-ui/icons/ReportProblemOutlined';
|
||||
import ConditionallyRender from '../../../common/ConditionallyRender/ConditionallyRender';
|
||||
import FeatureStatus from '../../../feature/FeatureView/FeatureStatus/FeatureStatus';
|
||||
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import FeatureStatus from 'component/feature/FeatureView/FeatureStatus/FeatureStatus';
|
||||
import {
|
||||
pluralize,
|
||||
getDates,
|
||||
expired,
|
||||
toggleExpiryByTypeMap,
|
||||
getDiffInDays,
|
||||
} from '../../utils';
|
||||
import {
|
||||
KILLSWITCH,
|
||||
PERMISSION,
|
||||
} from '../../../../constants/featureToggleTypes';
|
||||
|
||||
} from 'component/Reporting/utils';
|
||||
import { KILLSWITCH, PERMISSION } from 'constants/featureToggleTypes';
|
||||
import { useStyles } from '../ReportToggleList.styles';
|
||||
import { getTogglePath } from '../../../../utils/routePathHelpers';
|
||||
import { getTogglePath } from 'utils/routePathHelpers';
|
||||
|
||||
const ReportToggleListItem = ({
|
||||
name,
|
||||
|
@ -1,11 +1,7 @@
|
||||
import parseISO from 'date-fns/parseISO';
|
||||
import differenceInDays from 'date-fns/differenceInDays';
|
||||
|
||||
import {
|
||||
EXPERIMENT,
|
||||
OPERATIONAL,
|
||||
RELEASE,
|
||||
} from '../../constants/featureToggleTypes';
|
||||
import { EXPERIMENT, OPERATIONAL, RELEASE } from 'constants/featureToggleTypes';
|
||||
|
||||
import { FOURTYDAYS, SEVENDAYS } from './constants';
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Grid, FormControlLabel, Checkbox } from '@material-ui/core';
|
||||
|
||||
import { styles as commonStyles } from '../../../common';
|
||||
import { IAddonProvider } from '../../../../interfaces/addons';
|
||||
import { styles as commonStyles } from 'component/common';
|
||||
import { IAddonProvider } from 'interfaces/addons';
|
||||
|
||||
interface IAddonProps {
|
||||
provider: IAddonProvider;
|
||||
|
@ -1,15 +1,15 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { TextField, FormControlLabel, Switch, Button } from '@material-ui/core';
|
||||
import { styles as commonStyles } from '../../common';
|
||||
import { trim } from '../../common/util';
|
||||
import { styles as commonStyles } from 'component/common';
|
||||
import { trim } from 'component/common/util';
|
||||
import { AddonParameters } from './AddonParameters/AddonParameters';
|
||||
import { AddonEvents } from './AddonEvents/AddonEvents';
|
||||
import cloneDeep from 'lodash.clonedeep';
|
||||
import PageContent from '../../common/PageContent/PageContent';
|
||||
import PageContent from 'component/common/PageContent/PageContent';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import useAddonsApi from '../../../hooks/api/actions/useAddonsApi/useAddonsApi';
|
||||
import useToast from '../../../hooks/useToast';
|
||||
import useAddonsApi from 'hooks/api/actions/useAddonsApi/useAddonsApi';
|
||||
import useToast from 'hooks/useToast';
|
||||
import { makeStyles } from '@material-ui/styles';
|
||||
|
||||
const useStyles = makeStyles(theme => ({
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
IAddonConfig,
|
||||
IAddonProvider,
|
||||
IAddonProviderParams,
|
||||
} from '../../../../../interfaces/addons';
|
||||
} from 'interfaces/addons';
|
||||
|
||||
const resolveType = ({ type = 'text', sensitive = false }, value: string) => {
|
||||
if (sensitive && value === MASKED_VALUE) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { IAddonConfig, IAddonProvider } from '../../../../interfaces/addons';
|
||||
import { IAddonConfig, IAddonProvider } from 'interfaces/addons';
|
||||
import { AddonParameter } from './AddonParameter/AddonParameter';
|
||||
|
||||
interface IAddonParametersProps {
|
||||
|
@ -3,14 +3,14 @@ import { ConfiguredAddons } from './ConfiguredAddons/ConfiguredAddons';
|
||||
import { AvailableAddons } from './AvailableAddons/AvailableAddons';
|
||||
import { Avatar } from '@material-ui/core';
|
||||
import { DeviceHub } from '@material-ui/icons';
|
||||
import ConditionallyRender from '../../common/ConditionallyRender/ConditionallyRender';
|
||||
import slackIcon from '../../../assets/icons/slack.svg';
|
||||
import jiraIcon from '../../../assets/icons/jira.svg';
|
||||
import webhooksIcon from '../../../assets/icons/webhooks.svg';
|
||||
import teamsIcon from '../../../assets/icons/teams.svg';
|
||||
import dataDogIcon from '../../../assets/icons/datadog.svg';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import slackIcon from 'assets/icons/slack.svg';
|
||||
import jiraIcon from 'assets/icons/jira.svg';
|
||||
import webhooksIcon from 'assets/icons/webhooks.svg';
|
||||
import teamsIcon from 'assets/icons/teams.svg';
|
||||
import dataDogIcon from 'assets/icons/datadog.svg';
|
||||
import { formatAssetPath } from 'utils/formatPath';
|
||||
import useAddons from '../../../hooks/api/getters/useAddons/useAddons';
|
||||
import useAddons from 'hooks/api/getters/useAddons/useAddons';
|
||||
|
||||
const style: React.CSSProperties = {
|
||||
width: '40px',
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ReactElement } from 'react';
|
||||
import PageContent from '../../../common/PageContent/PageContent';
|
||||
import PageContent from 'component/common/PageContent/PageContent';
|
||||
import {
|
||||
List,
|
||||
ListItem,
|
||||
@ -7,9 +7,9 @@ import {
|
||||
ListItemSecondaryAction,
|
||||
ListItemText,
|
||||
} from '@material-ui/core';
|
||||
import { CREATE_ADDON } from '../../../providers/AccessProvider/permissions';
|
||||
import { CREATE_ADDON } from 'component/providers/AccessProvider/permissions';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import PermissionButton from '../../../common/PermissionButton/PermissionButton';
|
||||
import PermissionButton from 'component/common/PermissionButton/PermissionButton';
|
||||
|
||||
interface IProvider {
|
||||
name: string;
|
||||
|
@ -6,21 +6,21 @@ import {
|
||||
ListItemText,
|
||||
} from '@material-ui/core';
|
||||
import { Delete, Edit, Visibility, VisibilityOff } from '@material-ui/icons';
|
||||
import ConditionallyRender from '../../../common/ConditionallyRender/ConditionallyRender';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import {
|
||||
DELETE_ADDON,
|
||||
UPDATE_ADDON,
|
||||
} from '../../../providers/AccessProvider/permissions';
|
||||
} from 'component/providers/AccessProvider/permissions';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import PageContent from '../../../common/PageContent/PageContent';
|
||||
import useAddons from '../../../../hooks/api/getters/useAddons/useAddons';
|
||||
import useToast from '../../../../hooks/useToast';
|
||||
import useAddonsApi from '../../../../hooks/api/actions/useAddonsApi/useAddonsApi';
|
||||
import PageContent from 'component/common/PageContent/PageContent';
|
||||
import useAddons from 'hooks/api/getters/useAddons/useAddons';
|
||||
import useToast from 'hooks/useToast';
|
||||
import useAddonsApi from 'hooks/api/actions/useAddonsApi/useAddonsApi';
|
||||
import { ReactElement, useContext, useState } from 'react';
|
||||
import AccessContext from '../../../../contexts/AccessContext';
|
||||
import { IAddon } from '../../../../interfaces/addons';
|
||||
import PermissionIconButton from '../../../common/PermissionIconButton/PermissionIconButton';
|
||||
import Dialogue from '../../../common/Dialogue';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import { IAddon } from 'interfaces/addons';
|
||||
import PermissionIconButton from 'component/common/PermissionIconButton/PermissionIconButton';
|
||||
import Dialogue from 'component/common/Dialogue';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
|
||||
interface IConfigureAddonsProps {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { useParams } from 'react-router-dom';
|
||||
import useAddons from '../../../hooks/api/getters/useAddons/useAddons';
|
||||
import useAddons from 'hooks/api/getters/useAddons/useAddons';
|
||||
import { AddonForm } from '../AddonForm/AddonForm';
|
||||
import cloneDeep from 'lodash.clonedeep';
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { useParams } from 'react-router-dom';
|
||||
import useAddons from '../../../hooks/api/getters/useAddons/useAddons';
|
||||
import useAddons from 'hooks/api/getters/useAddons/useAddons';
|
||||
import { AddonForm } from '../AddonForm/AddonForm';
|
||||
import cloneDeep from 'lodash.clonedeep';
|
||||
import { IAddon } from '../../../interfaces/addons';
|
||||
import { IAddon } from 'interfaces/addons';
|
||||
|
||||
interface IAddonEditParams {
|
||||
addonId: string;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { ApiTokenList } from '../apiToken/ApiTokenList/ApiTokenList';
|
||||
import AdminMenu from '../menu/AdminMenu';
|
||||
import ConditionallyRender from '../../common/ConditionallyRender';
|
||||
import AccessContext from '../../../contexts/AccessContext';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import { useContext } from 'react';
|
||||
|
||||
const ApiPage = () => {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { Button } from '@material-ui/core';
|
||||
import { KeyboardArrowDownOutlined } from '@material-ui/icons';
|
||||
import React from 'react';
|
||||
import { useEnvironments } from '../../../../hooks/api/getters/useEnvironments/useEnvironments';
|
||||
import useProjects from '../../../../hooks/api/getters/useProjects/useProjects';
|
||||
import GeneralSelect from '../../../common/GeneralSelect/GeneralSelect';
|
||||
import Input from '../../../common/Input/Input';
|
||||
import { useEnvironments } from 'hooks/api/getters/useEnvironments/useEnvironments';
|
||||
import useProjects from 'hooks/api/getters/useProjects/useProjects';
|
||||
import GeneralSelect from 'component/common/GeneralSelect/GeneralSelect';
|
||||
import Input from 'component/common/Input/Input';
|
||||
import { useStyles } from './ApiTokenForm.styles';
|
||||
interface IApiTokenFormProps {
|
||||
username: string;
|
||||
|
@ -9,28 +9,28 @@ import {
|
||||
TableHead,
|
||||
TableRow,
|
||||
} from '@material-ui/core';
|
||||
import AccessContext from '../../../../contexts/AccessContext';
|
||||
import useToast from '../../../../hooks/useToast';
|
||||
import useLoading from '../../../../hooks/useLoading';
|
||||
import useApiTokens from '../../../../hooks/api/getters/useApiTokens/useApiTokens';
|
||||
import useUiConfig from '../../../../hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import useApiTokensApi from '../../../../hooks/api/actions/useApiTokensApi/useApiTokensApi';
|
||||
import ApiError from '../../../common/ApiError/ApiError';
|
||||
import PageContent from '../../../common/PageContent';
|
||||
import HeaderTitle from '../../../common/HeaderTitle';
|
||||
import ConditionallyRender from '../../../common/ConditionallyRender';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import useToast from 'hooks/useToast';
|
||||
import useLoading from 'hooks/useLoading';
|
||||
import useApiTokens from 'hooks/api/getters/useApiTokens/useApiTokens';
|
||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import useApiTokensApi from 'hooks/api/actions/useApiTokensApi/useApiTokensApi';
|
||||
import ApiError from 'component/common/ApiError/ApiError';
|
||||
import PageContent from 'component/common/PageContent';
|
||||
import HeaderTitle from 'component/common/HeaderTitle';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import {
|
||||
CREATE_API_TOKEN,
|
||||
DELETE_API_TOKEN,
|
||||
} from '../../../providers/AccessProvider/permissions';
|
||||
} from 'component/providers/AccessProvider/permissions';
|
||||
import { useStyles } from './ApiTokenList.styles';
|
||||
import Secret from './secret';
|
||||
import { Delete, FileCopy } from '@material-ui/icons';
|
||||
import Dialogue from '../../../common/Dialogue';
|
||||
import { CREATE_API_TOKEN_BUTTON } from '../../../../testIds';
|
||||
import Dialogue from 'component/common/Dialogue';
|
||||
import { CREATE_API_TOKEN_BUTTON } from 'testIds';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import copy from 'copy-to-clipboard';
|
||||
import { useLocationSettings } from '../../../../hooks/useLocationSettings';
|
||||
import { useLocationSettings } from 'hooks/useLocationSettings';
|
||||
import { formatDateYMD } from 'utils/formatDate';
|
||||
|
||||
interface IApiToken {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Typography } from '@material-ui/core';
|
||||
import { useCommonStyles } from '../../../../common.styles';
|
||||
import Dialogue from '../../../common/Dialogue';
|
||||
import { useCommonStyles } from 'common.styles';
|
||||
import Dialogue from 'component/common/Dialogue';
|
||||
import { UserToken } from './UserToken/UserToken';
|
||||
|
||||
interface IConfirmUserLink {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IconButton } from '@material-ui/core';
|
||||
import CopyIcon from '@material-ui/icons/FileCopy';
|
||||
import copy from 'copy-to-clipboard';
|
||||
import useToast from '../../../../../hooks/useToast';
|
||||
import useToast from 'hooks/useToast';
|
||||
|
||||
interface IUserTokenProps {
|
||||
token: string;
|
||||
|
@ -9,7 +9,7 @@ import { useApiTokenForm } from '../hooks/useApiTokenForm';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import { ConfirmToken } from '../ConfirmToken/ConfirmToken';
|
||||
import { useState } from 'react';
|
||||
import { scrollToTop } from '../../../common/util';
|
||||
import { scrollToTop } from 'component/common/util';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
|
||||
export const CreateApiToken = () => {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import React from 'react';
|
||||
import AdminMenu from '../menu/AdminMenu';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import TabNav from '../../common/TabNav/TabNav';
|
||||
import PageContent from '../../common/PageContent/PageContent';
|
||||
import ConditionallyRender from '../../common/ConditionallyRender/ConditionallyRender';
|
||||
import useUiConfig from '../../../hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import TabNav from 'component/common/TabNav/TabNav';
|
||||
import PageContent from 'component/common/PageContent/PageContent';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import { OidcAuth } from './OidcAuth/OidcAuth';
|
||||
import { SamlAuth } from './SamlAuth/SamlAuth';
|
||||
import { PasswordAuth } from './PasswordAuth/PasswordAuth';
|
||||
|
@ -7,13 +7,13 @@ import {
|
||||
TextField,
|
||||
} from '@material-ui/core';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import PageContent from '../../../common/PageContent/PageContent';
|
||||
import AccessContext from '../../../../contexts/AccessContext';
|
||||
import { ADMIN } from '../../../providers/AccessProvider/permissions';
|
||||
import useUiConfig from '../../../../hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import useAuthSettings from '../../../../hooks/api/getters/useAuthSettings/useAuthSettings';
|
||||
import useAuthSettingsApi from '../../../../hooks/api/actions/useAuthSettingsApi/useAuthSettingsApi';
|
||||
import useToast from '../../../../hooks/useToast';
|
||||
import PageContent from 'component/common/PageContent/PageContent';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import useAuthSettings from 'hooks/api/getters/useAuthSettings/useAuthSettings';
|
||||
import useAuthSettingsApi from 'hooks/api/actions/useAuthSettingsApi/useAuthSettingsApi';
|
||||
import useToast from 'hooks/useToast';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
import { removeEmptyStringFields } from 'utils/removeEmptyStringFields';
|
||||
|
||||
|
@ -7,14 +7,14 @@ import {
|
||||
TextField,
|
||||
} from '@material-ui/core';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import PageContent from '../../../common/PageContent/PageContent';
|
||||
import AccessContext from '../../../../contexts/AccessContext';
|
||||
import { ADMIN } from '../../../providers/AccessProvider/permissions';
|
||||
import PageContent from 'component/common/PageContent/PageContent';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import { AutoCreateForm } from '../AutoCreateForm/AutoCreateForm';
|
||||
import useUiConfig from '../../../../hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import useAuthSettingsApi from '../../../../hooks/api/actions/useAuthSettingsApi/useAuthSettingsApi';
|
||||
import useAuthSettings from '../../../../hooks/api/getters/useAuthSettings/useAuthSettings';
|
||||
import useToast from '../../../../hooks/useToast';
|
||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import useAuthSettingsApi from 'hooks/api/actions/useAuthSettingsApi/useAuthSettingsApi';
|
||||
import useAuthSettings from 'hooks/api/getters/useAuthSettings/useAuthSettings';
|
||||
import useToast from 'hooks/useToast';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
import { removeEmptyStringFields } from 'utils/removeEmptyStringFields';
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import { Button, FormControlLabel, Grid, Switch } from '@material-ui/core';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import PageContent from '../../../common/PageContent/PageContent';
|
||||
import AccessContext from '../../../../contexts/AccessContext';
|
||||
import { ADMIN } from '../../../providers/AccessProvider/permissions';
|
||||
import useAuthSettings from '../../../../hooks/api/getters/useAuthSettings/useAuthSettings';
|
||||
import PageContent from 'component/common/PageContent/PageContent';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import useAuthSettings from 'hooks/api/getters/useAuthSettings/useAuthSettings';
|
||||
import useAuthSettingsApi, {
|
||||
ISimpleAuthSettings,
|
||||
} from '../../../../hooks/api/actions/useAuthSettingsApi/useAuthSettingsApi';
|
||||
import useToast from '../../../../hooks/useToast';
|
||||
} from 'hooks/api/actions/useAuthSettingsApi/useAuthSettingsApi';
|
||||
import useToast from 'hooks/useToast';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
|
||||
export const PasswordAuth = () => {
|
||||
|
@ -7,14 +7,14 @@ import {
|
||||
TextField,
|
||||
} from '@material-ui/core';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import PageContent from '../../../common/PageContent/PageContent';
|
||||
import AccessContext from '../../../../contexts/AccessContext';
|
||||
import { ADMIN } from '../../../providers/AccessProvider/permissions';
|
||||
import PageContent from 'component/common/PageContent/PageContent';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import { AutoCreateForm } from '../AutoCreateForm/AutoCreateForm';
|
||||
import useToast from '../../../../hooks/useToast';
|
||||
import useUiConfig from '../../../../hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import useAuthSettings from '../../../../hooks/api/getters/useAuthSettings/useAuthSettings';
|
||||
import useAuthSettingsApi from '../../../../hooks/api/actions/useAuthSettingsApi/useAuthSettingsApi';
|
||||
import useToast from 'hooks/useToast';
|
||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import useAuthSettings from 'hooks/api/getters/useAuthSettings/useAuthSettings';
|
||||
import useAuthSettingsApi from 'hooks/api/actions/useAuthSettingsApi/useAuthSettingsApi';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
import { removeEmptyStringFields } from 'utils/removeEmptyStringFields';
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { useContext } from 'react';
|
||||
import InvoiceList from './InvoiceList';
|
||||
import AccessContext from '../../../contexts/AccessContext';
|
||||
import { ADMIN } from '../../providers/AccessProvider/permissions';
|
||||
import ConditionallyRender from '../../common/ConditionallyRender';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
|
||||
const InvoiceAdminPage = () => {
|
||||
|
@ -8,13 +8,13 @@ import {
|
||||
Button,
|
||||
} from '@material-ui/core';
|
||||
import OpenInNew from '@material-ui/icons/OpenInNew';
|
||||
import PageContent from '../../common/PageContent';
|
||||
import HeaderTitle from '../../common/HeaderTitle';
|
||||
import ConditionallyRender from '../../common/ConditionallyRender';
|
||||
import PageContent from 'component/common/PageContent';
|
||||
import HeaderTitle from 'component/common/HeaderTitle';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import { formatApiPath } from 'utils/formatPath';
|
||||
import useInvoices from '../../../hooks/api/getters/useInvoices/useInvoices';
|
||||
import { IInvoice } from '../../../interfaces/invoice';
|
||||
import { useLocationSettings } from '../../../hooks/useLocationSettings';
|
||||
import useInvoices from 'hooks/api/getters/useInvoices/useInvoices';
|
||||
import { IInvoice } from 'interfaces/invoice';
|
||||
import { useLocationSettings } from 'hooks/useLocationSettings';
|
||||
import { formatDateYMD } from 'utils/formatDate';
|
||||
|
||||
const PORTAL_URL = formatApiPath('api/admin/invoices/portal');
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { NavLink, useLocation } from 'react-router-dom';
|
||||
import { Paper, Tab, Tabs } from '@material-ui/core';
|
||||
import useUiConfig from '../../../hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
|
||||
const navLinkStyle = {
|
||||
display: 'flex',
|
||||
|
@ -10,9 +10,9 @@ import { useEffect, useState } from 'react';
|
||||
import {
|
||||
IPermission,
|
||||
IProjectEnvironmentPermissions,
|
||||
} from '../../../../../interfaces/project';
|
||||
import StringTruncator from '../../../../common/StringTruncator/StringTruncator';
|
||||
import { ICheckedPermission } from '../../hooks/useProjectRoleForm';
|
||||
} from 'interfaces/project';
|
||||
import StringTruncator from 'component/common/StringTruncator/StringTruncator';
|
||||
import { ICheckedPermission } from 'component/admin/projectRoles/hooks/useProjectRoleForm';
|
||||
import { useStyles } from './EnvironmentPermissionAccordion.styles';
|
||||
|
||||
type PermissionMap = { [key: string]: boolean };
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Input from '../../../common/Input/Input';
|
||||
import Input from 'component/common/Input/Input';
|
||||
import EnvironmentPermissionAccordion from './EnvironmentPermissionAccordion/EnvironmentPermissionAccordion';
|
||||
import {
|
||||
Button,
|
||||
@ -6,12 +6,12 @@ import {
|
||||
FormControlLabel,
|
||||
TextField,
|
||||
} from '@material-ui/core';
|
||||
import useProjectRolePermissions from '../../../../hooks/api/getters/useProjectRolePermissions/useProjectRolePermissions';
|
||||
import useProjectRolePermissions from 'hooks/api/getters/useProjectRolePermissions/useProjectRolePermissions';
|
||||
|
||||
import { useStyles } from './ProjectRoleForm.styles';
|
||||
import ConditionallyRender from '../../../common/ConditionallyRender';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { IPermission } from '../../../../interfaces/project';
|
||||
import { IPermission } from 'interfaces/project';
|
||||
import {
|
||||
ICheckedPermission,
|
||||
PROJECT_CHECK_ALL_KEY,
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import React from 'react';
|
||||
import { IProjectRole } from '../../../../../interfaces/role';
|
||||
import Dialogue from '../../../../common/Dialogue';
|
||||
import Input from '../../../../common/Input/Input';
|
||||
import { IProjectRole } from 'interfaces/role';
|
||||
import Dialogue from 'component/common/Dialogue';
|
||||
import Input from 'component/common/Input/Input';
|
||||
import { useStyles } from './ProjectRoleDeleteConfirm.styles';
|
||||
|
||||
interface IProjectRoleDeleteConfirmProps {
|
||||
|
@ -6,15 +6,15 @@ import {
|
||||
TableHead,
|
||||
TableRow,
|
||||
} from '@material-ui/core';
|
||||
import AccessContext from '../../../../../contexts/AccessContext';
|
||||
import usePagination from '../../../../../hooks/usePagination';
|
||||
import { ADMIN } from '../../../../providers/AccessProvider/permissions';
|
||||
import PaginateUI from '../../../../common/PaginateUI/PaginateUI';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import usePagination from 'hooks/usePagination';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import PaginateUI from 'component/common/PaginateUI/PaginateUI';
|
||||
import ProjectRoleListItem from './ProjectRoleListItem/ProjectRoleListItem';
|
||||
import useProjectRoles from '../../../../../hooks/api/getters/useProjectRoles/useProjectRoles';
|
||||
import IRole, { IProjectRole } from '../../../../../interfaces/role';
|
||||
import useProjectRolesApi from '../../../../../hooks/api/actions/useProjectRolesApi/useProjectRolesApi';
|
||||
import useToast from '../../../../../hooks/useToast';
|
||||
import useProjectRoles from 'hooks/api/getters/useProjectRoles/useProjectRoles';
|
||||
import IRole, { IProjectRole } from 'interfaces/role';
|
||||
import useProjectRolesApi from 'hooks/api/actions/useProjectRolesApi/useProjectRolesApi';
|
||||
import useToast from 'hooks/useToast';
|
||||
import ProjectRoleDeleteConfirm from '../ProjectRoleDeleteConfirm/ProjectRoleDeleteConfirm';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
import { useStyles } from './ProjectRoleListItem/ProjectRoleListItem.styles';
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { useStyles } from './ProjectRoleListItem.styles';
|
||||
import { TableCell, TableRow, Typography } from '@material-ui/core';
|
||||
import { Delete, Edit } from '@material-ui/icons';
|
||||
import { ADMIN } from '../../../../../providers/AccessProvider/permissions';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import SupervisedUserCircleIcon from '@material-ui/icons/SupervisedUserCircle';
|
||||
import PermissionIconButton from '../../../../../common/PermissionIconButton/PermissionIconButton';
|
||||
import { IProjectRole } from '../../../../../../interfaces/role';
|
||||
import PermissionIconButton from 'component/common/PermissionIconButton/PermissionIconButton';
|
||||
import { IProjectRole } from 'interfaces/role';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import React from 'react';
|
||||
|
||||
|
@ -2,12 +2,12 @@ import { Button } from '@material-ui/core';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import { useContext } from 'react';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import AccessContext from '../../../../contexts/AccessContext';
|
||||
import ConditionallyRender from '../../../common/ConditionallyRender';
|
||||
import HeaderTitle from '../../../common/HeaderTitle';
|
||||
import PageContent from '../../../common/PageContent';
|
||||
import { ADMIN } from '../../../providers/AccessProvider/permissions';
|
||||
import AdminMenu from '../../menu/AdminMenu';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import HeaderTitle from 'component/common/HeaderTitle';
|
||||
import PageContent from 'component/common/PageContent';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import AdminMenu from 'component/admin/menu/AdminMenu';
|
||||
import { useStyles } from './ProjectRoles.styles';
|
||||
import ProjectRoleList from './ProjectRoleList/ProjectRoleList';
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { IPermission } from '../../../../interfaces/project';
|
||||
import { IPermission } from 'interfaces/project';
|
||||
import cloneDeep from 'lodash.clonedeep';
|
||||
import useProjectRolePermissions from '../../../../hooks/api/getters/useProjectRolePermissions/useProjectRolePermissions';
|
||||
import useProjectRolesApi from '../../../../hooks/api/actions/useProjectRolesApi/useProjectRolesApi';
|
||||
import useProjectRolePermissions from 'hooks/api/getters/useProjectRolePermissions/useProjectRolePermissions';
|
||||
import useProjectRolesApi from 'hooks/api/actions/useProjectRolesApi/useProjectRolesApi';
|
||||
|
||||
export interface ICheckedPermission {
|
||||
[key: string]: IPermission;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Typography } from '@material-ui/core';
|
||||
import Dialogue from '../../../../common/Dialogue';
|
||||
import Dialogue from 'component/common/Dialogue';
|
||||
|
||||
import { ReactComponent as EmailIcon } from '../../../../../assets/icons/email.svg';
|
||||
import { ReactComponent as EmailIcon } from 'assets/icons/email.svg';
|
||||
import { useStyles } from './ConfirmUserEmail.styles';
|
||||
import UserInviteLink from '../ConfirmUserLink/UserInviteLink/UserInviteLink';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Typography } from '@material-ui/core';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import { useCommonStyles } from '../../../../../common.styles';
|
||||
import Dialogue from '../../../../common/Dialogue';
|
||||
import { useCommonStyles } from 'common.styles';
|
||||
import Dialogue from 'component/common/Dialogue';
|
||||
import UserInviteLink from './UserInviteLink/UserInviteLink';
|
||||
|
||||
interface IConfirmUserLink {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { IconButton } from '@material-ui/core';
|
||||
import CopyIcon from '@material-ui/icons/FileCopy';
|
||||
import useToast from '../../../../../../hooks/useToast';
|
||||
import useToast from 'hooks/useToast';
|
||||
|
||||
interface IInviteLinkProps {
|
||||
inviteLink: string;
|
||||
|
@ -7,7 +7,7 @@ import useToast from 'hooks/useToast';
|
||||
import useAddUserForm from '../hooks/useAddUserForm';
|
||||
import ConfirmUserAdded from '../ConfirmUserAdded/ConfirmUserAdded';
|
||||
import { useState } from 'react';
|
||||
import { scrollToTop } from '../../../common/util';
|
||||
import { scrollToTop } from 'component/common/util';
|
||||
import { CreateButton } from 'component/common/CreateButton/CreateButton';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { useHistory, useParams } from 'react-router-dom';
|
||||
import UserForm from '../UserForm/UserForm';
|
||||
import useAddUserForm from '../hooks/useAddUserForm';
|
||||
import { scrollToTop } from '../../../common/util';
|
||||
import { scrollToTop } from 'component/common/util';
|
||||
import { useEffect } from 'react';
|
||||
import { UpdateButton } from 'component/common/UpdateButton/UpdateButton';
|
||||
import FormTemplate from 'component/common/FormTemplate/FormTemplate';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Input from '../../../common/Input/Input';
|
||||
import Input from 'component/common/Input/Input';
|
||||
import {
|
||||
FormControlLabel,
|
||||
Button,
|
||||
@ -10,10 +10,10 @@ import {
|
||||
} from '@material-ui/core';
|
||||
import { useStyles } from './UserForm.styles';
|
||||
import React from 'react';
|
||||
import useUsers from '../../../../hooks/api/getters/useUsers/useUsers';
|
||||
import ConditionallyRender from '../../../common/ConditionallyRender/ConditionallyRender';
|
||||
import { EDIT } from '../../../../constants/misc';
|
||||
import useUiBootstrap from '../../../../hooks/api/getters/useUiBootstrap/useUiBootstrap';
|
||||
import useUsers from 'hooks/api/getters/useUsers/useUsers';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import { EDIT } from 'constants/misc';
|
||||
import useUiBootstrap from 'hooks/api/getters/useUiBootstrap/useUiBootstrap';
|
||||
|
||||
interface IUserForm {
|
||||
email: string;
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { useContext } from 'react';
|
||||
import UsersList from './UsersList/UsersList';
|
||||
import AdminMenu from '../menu/AdminMenu';
|
||||
import PageContent from '../../common/PageContent/PageContent';
|
||||
import AccessContext from '../../../contexts/AccessContext';
|
||||
import ConditionallyRender from '../../common/ConditionallyRender';
|
||||
import { ADMIN } from '../../providers/AccessProvider/permissions';
|
||||
import PageContent from 'component/common/PageContent/PageContent';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import HeaderTitle from '../../common/HeaderTitle';
|
||||
import HeaderTitle from 'component/common/HeaderTitle';
|
||||
import { Button } from '@material-ui/core';
|
||||
import { useStyles } from './UserAdmin.styles';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
|
@ -1,15 +1,15 @@
|
||||
import { useState } from 'react';
|
||||
import classnames from 'classnames';
|
||||
import { Avatar, TextField, Typography } from '@material-ui/core';
|
||||
import { trim } from '../../../../common/util';
|
||||
import { modalStyles } from '../../util';
|
||||
import Dialogue from '../../../../common/Dialogue/Dialogue';
|
||||
import PasswordChecker from '../../../../user/common/ResetPasswordForm/PasswordChecker/PasswordChecker';
|
||||
import { useCommonStyles } from '../../../../../common.styles';
|
||||
import PasswordMatcher from '../../../../user/common/ResetPasswordForm/PasswordMatcher/PasswordMatcher';
|
||||
import ConditionallyRender from '../../../../common/ConditionallyRender';
|
||||
import { trim } from 'component/common/util';
|
||||
import { modalStyles } from 'component/admin/users/util';
|
||||
import Dialogue from 'component/common/Dialogue/Dialogue';
|
||||
import PasswordChecker from 'component/user/common/ResetPasswordForm/PasswordChecker/PasswordChecker';
|
||||
import { useCommonStyles } from 'common.styles';
|
||||
import PasswordMatcher from 'component/user/common/ResetPasswordForm/PasswordMatcher/PasswordMatcher';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import { IUser } from '../../../../../interfaces/user';
|
||||
import { IUser } from 'interfaces/user';
|
||||
|
||||
interface IChangePasswordProps {
|
||||
showDialog: boolean;
|
||||
|
@ -1,12 +1,12 @@
|
||||
import React from 'react';
|
||||
import Dialogue from '../../../../common/Dialogue/Dialogue';
|
||||
import ConditionallyRender from '../../../../common/ConditionallyRender/ConditionallyRender';
|
||||
import { REMOVE_USER_ERROR } from '../../../../../hooks/api/actions/useAdminUsersApi/useAdminUsersApi';
|
||||
import Dialogue from 'component/common/Dialogue/Dialogue';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import { REMOVE_USER_ERROR } from 'hooks/api/actions/useAdminUsersApi/useAdminUsersApi';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import useLoading from '../../../../../hooks/useLoading';
|
||||
import useLoading from 'hooks/useLoading';
|
||||
import { Avatar, Typography } from '@material-ui/core';
|
||||
import { useCommonStyles } from '../../../../../common.styles';
|
||||
import { IUser } from '../../../../../interfaces/user';
|
||||
import { useCommonStyles } from 'common.styles';
|
||||
import { IUser } from 'interfaces/user';
|
||||
|
||||
interface IDeleteUserProps {
|
||||
showDialog: boolean;
|
||||
|
@ -7,13 +7,13 @@ import {
|
||||
} from '@material-ui/core';
|
||||
import { Delete, Edit, Lock } from '@material-ui/icons';
|
||||
import { SyntheticEvent, useContext } from 'react';
|
||||
import { ADMIN } from '../../../../providers/AccessProvider/permissions';
|
||||
import ConditionallyRender from '../../../../common/ConditionallyRender';
|
||||
import AccessContext from '../../../../../contexts/AccessContext';
|
||||
import { IUser } from '../../../../../interfaces/user';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import { IUser } from 'interfaces/user';
|
||||
import { useStyles } from './UserListItem.styles';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { ILocationSettings } from '../../../../../hooks/useLocationSettings';
|
||||
import { ILocationSettings } from 'hooks/useLocationSettings';
|
||||
import { formatDateYMD } from 'utils/formatDate';
|
||||
|
||||
interface IUserListItemProps {
|
||||
|
@ -9,21 +9,21 @@ import {
|
||||
} from '@material-ui/core';
|
||||
import ChangePassword from './ChangePassword/ChangePassword';
|
||||
import DeleteUser from './DeleteUser/DeleteUser';
|
||||
import ConditionallyRender from '../../../common/ConditionallyRender/ConditionallyRender';
|
||||
import AccessContext from '../../../../contexts/AccessContext';
|
||||
import { ADMIN } from '../../../providers/AccessProvider/permissions';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import ConfirmUserAdded from '../ConfirmUserAdded/ConfirmUserAdded';
|
||||
import useUsers from '../../../../hooks/api/getters/useUsers/useUsers';
|
||||
import useAdminUsersApi from '../../../../hooks/api/actions/useAdminUsersApi/useAdminUsersApi';
|
||||
import useUsers from 'hooks/api/getters/useUsers/useUsers';
|
||||
import useAdminUsersApi from 'hooks/api/actions/useAdminUsersApi/useAdminUsersApi';
|
||||
import UserListItem from './UserListItem/UserListItem';
|
||||
import loadingData from './loadingData';
|
||||
import useLoading from '../../../../hooks/useLoading';
|
||||
import usePagination from '../../../../hooks/usePagination';
|
||||
import PaginateUI from '../../../common/PaginateUI/PaginateUI';
|
||||
import { IUser } from '../../../../interfaces/user';
|
||||
import IRole from '../../../../interfaces/role';
|
||||
import useToast from '../../../../hooks/useToast';
|
||||
import { useLocationSettings } from '../../../../hooks/useLocationSettings';
|
||||
import useLoading from 'hooks/useLoading';
|
||||
import usePagination from 'hooks/usePagination';
|
||||
import PaginateUI from 'component/common/PaginateUI/PaginateUI';
|
||||
import { IUser } from 'interfaces/user';
|
||||
import IRole from 'interfaces/role';
|
||||
import useToast from 'hooks/useToast';
|
||||
import { useLocationSettings } from 'hooks/useLocationSettings';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
import { useStyles } from './UserListItem/UserListItem.styles';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { IUser } from '../../../../interfaces/user';
|
||||
import { IUser } from 'interfaces/user';
|
||||
|
||||
const loadingData: IUser[] = [
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import useUiBootstrap from '../../../../hooks/api/getters/useUiBootstrap/useUiBootstrap';
|
||||
import useUsers from '../../../../hooks/api/getters/useUsers/useUsers';
|
||||
import useUiBootstrap from 'hooks/api/getters/useUiBootstrap/useUiBootstrap';
|
||||
import useUsers from 'hooks/api/getters/useUsers/useUsers';
|
||||
|
||||
const useCreateUserForm = (
|
||||
initialName = '',
|
||||
|
@ -2,10 +2,10 @@ import { ThemeProvider } from '@material-ui/core';
|
||||
import { ApplicationEdit } from './ApplicationEdit';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ADMIN } from '../../providers/AccessProvider/permissions';
|
||||
import theme from '../../../themes/mainTheme';
|
||||
import AccessProvider from '../../providers/AccessProvider/AccessProvider';
|
||||
import UIProvider from '../../providers/UIProvider/UIProvider';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import theme from 'themes/mainTheme';
|
||||
import AccessProvider from 'component/providers/AccessProvider/AccessProvider';
|
||||
import UIProvider from 'component/providers/UIProvider/UIProvider';
|
||||
|
||||
test('renders correctly if no application', () => {
|
||||
const tree = renderer
|
||||
|
@ -9,21 +9,21 @@ import {
|
||||
Typography,
|
||||
} from '@material-ui/core';
|
||||
import { Link as LinkIcon } from '@material-ui/icons';
|
||||
import ConditionallyRender from '../../common/ConditionallyRender/ConditionallyRender';
|
||||
import { UPDATE_APPLICATION } from '../../providers/AccessProvider/permissions';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import { UPDATE_APPLICATION } from 'component/providers/AccessProvider/permissions';
|
||||
import { ApplicationView } from '../ApplicationView/ApplicationView';
|
||||
import { ApplicationUpdate } from '../ApplicationUpdate/ApplicationUpdate';
|
||||
import TabNav from '../../common/TabNav/TabNav';
|
||||
import Dialogue from '../../common/Dialogue';
|
||||
import PageContent from '../../common/PageContent';
|
||||
import HeaderTitle from '../../common/HeaderTitle';
|
||||
import AccessContext from '../../../contexts/AccessContext';
|
||||
import useApplicationsApi from '../../../hooks/api/actions/useApplicationsApi/useApplicationsApi';
|
||||
import useApplication from '../../../hooks/api/getters/useApplication/useApplication';
|
||||
import TabNav from 'component/common/TabNav/TabNav';
|
||||
import Dialogue from 'component/common/Dialogue';
|
||||
import PageContent from 'component/common/PageContent';
|
||||
import HeaderTitle from 'component/common/HeaderTitle';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import useApplicationsApi from 'hooks/api/actions/useApplicationsApi/useApplicationsApi';
|
||||
import useApplication from 'hooks/api/getters/useApplication/useApplication';
|
||||
import { useHistory, useParams } from 'react-router-dom';
|
||||
import { useLocationSettings } from '../../../hooks/useLocationSettings';
|
||||
import useToast from '../../../hooks/useToast';
|
||||
import PermissionButton from '../../common/PermissionButton/PermissionButton';
|
||||
import { useLocationSettings } from 'hooks/useLocationSettings';
|
||||
import useToast from 'hooks/useToast';
|
||||
import PermissionButton from 'component/common/PermissionButton/PermissionButton';
|
||||
import { formatDateYMD } from 'utils/formatDate';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { useMemo, useState } from 'react';
|
||||
import { CircularProgress } from '@material-ui/core';
|
||||
import { Warning } from '@material-ui/icons';
|
||||
import { AppsLinkList, styles as commonStyles } from '../../common';
|
||||
import { AppsLinkList, styles as commonStyles } from 'component/common';
|
||||
import { SearchField } from 'component/common/SearchField/SearchField';
|
||||
import PageContent from '../../common/PageContent/PageContent';
|
||||
import HeaderTitle from '../../common/HeaderTitle';
|
||||
import useApplications from '../../../hooks/api/getters/useApplications/useApplications';
|
||||
import ConditionallyRender from '../../common/ConditionallyRender';
|
||||
import PageContent from 'component/common/PageContent/PageContent';
|
||||
import HeaderTitle from 'component/common/HeaderTitle';
|
||||
import useApplications from 'hooks/api/getters/useApplications/useApplications';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
|
||||
export const ApplicationList = () => {
|
||||
const { applications, loading } = useApplications();
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { ChangeEvent, useState } from 'react';
|
||||
import { Grid, TextField } from '@material-ui/core';
|
||||
import { useCommonStyles } from '../../../common.styles';
|
||||
import { useCommonStyles } from 'common.styles';
|
||||
import icons from 'component/application/iconNames';
|
||||
import GeneralSelect from '../../common/GeneralSelect/GeneralSelect';
|
||||
import useApplicationsApi from '../../../hooks/api/actions/useApplicationsApi/useApplicationsApi';
|
||||
import useToast from '../../../hooks/useToast';
|
||||
import { IApplication } from '../../../interfaces/application';
|
||||
import useApplication from '../../../hooks/api/getters/useApplication/useApplication';
|
||||
import GeneralSelect from 'component/common/GeneralSelect/GeneralSelect';
|
||||
import useApplicationsApi from 'hooks/api/actions/useApplicationsApi/useApplicationsApi';
|
||||
import useToast from 'hooks/useToast';
|
||||
import { IApplication } from 'interfaces/application';
|
||||
import useApplication from 'hooks/api/getters/useApplication/useApplication';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
|
||||
interface IApplicationUpdateProps {
|
||||
|
@ -18,13 +18,13 @@ import {
|
||||
import {
|
||||
CREATE_FEATURE,
|
||||
CREATE_STRATEGY,
|
||||
} from '../../providers/AccessProvider/permissions';
|
||||
import ConditionallyRender from '../../common/ConditionallyRender/ConditionallyRender';
|
||||
} from 'component/providers/AccessProvider/permissions';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import { getTogglePath } from 'utils/routePathHelpers';
|
||||
import useApplication from '../../../hooks/api/getters/useApplication/useApplication';
|
||||
import AccessContext from '../../../contexts/AccessContext';
|
||||
import useApplication from 'hooks/api/getters/useApplication/useApplication';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import { formatDateYMDHMS } from 'utils/formatDate';
|
||||
import { useLocationSettings } from '../../../hooks/useLocationSettings';
|
||||
import { useLocationSettings } from 'hooks/useLocationSettings';
|
||||
|
||||
export const ApplicationView = () => {
|
||||
const { hasAccess } = useContext(AccessContext);
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { useFeaturesArchive } from '../../hooks/api/getters/useFeaturesArchive/useFeaturesArchive';
|
||||
import { useFeaturesArchive } from 'hooks/api/getters/useFeaturesArchive/useFeaturesArchive';
|
||||
import FeatureToggleList from '../feature/FeatureToggleList/FeatureToggleList';
|
||||
import useUiConfig from '../../hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import { useFeaturesFilter } from '../../hooks/useFeaturesFilter';
|
||||
import { useFeatureArchiveApi } from '../../hooks/api/actions/useFeatureArchiveApi/useReviveFeatureApi';
|
||||
import useToast from '../../hooks/useToast';
|
||||
import { useFeaturesSort } from '../../hooks/useFeaturesSort';
|
||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import { useFeaturesFilter } from 'hooks/useFeaturesFilter';
|
||||
import { useFeatureArchiveApi } from 'hooks/api/actions/useFeatureArchiveApi/useReviveFeatureApi';
|
||||
import useToast from 'hooks/useToast';
|
||||
import { useFeaturesSort } from 'hooks/useFeaturesSort';
|
||||
|
||||
export const ArchiveListContainer = () => {
|
||||
const { setToastData, setToastApiError } = useToast();
|
||||
|
@ -2,7 +2,7 @@ import Breadcrumbs from '@material-ui/core/Breadcrumbs';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import ConditionallyRender from '../ConditionallyRender';
|
||||
import { useStyles } from './BreadcrumbNav.styles';
|
||||
import AccessContext from '../../../contexts/AccessContext';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import { useContext } from 'react';
|
||||
import StringTruncator from '../StringTruncator/StringTruncator';
|
||||
|
||||
|
@ -3,10 +3,10 @@ import classnames from 'classnames';
|
||||
import { IN, NOT_IN } from 'constants/operators';
|
||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import { useParams } from 'react-router';
|
||||
import { IFeatureViewParams } from '../../../interfaces/params';
|
||||
import { IConstraint } from '../../../interfaces/strategy';
|
||||
import { IFeatureViewParams } from 'interfaces/params';
|
||||
import { IConstraint } from 'interfaces/strategy';
|
||||
import { StrategySeparator } from '../StrategySeparator/StrategySeparator';
|
||||
import { UPDATE_FEATURE } from '../../providers/AccessProvider/permissions';
|
||||
import { UPDATE_FEATURE } from 'component/providers/AccessProvider/permissions';
|
||||
import ConditionallyRender from '../ConditionallyRender';
|
||||
import PermissionIconButton from '../PermissionIconButton/PermissionIconButton';
|
||||
import StringTruncator from '../StringTruncator/StringTruncator';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IConstraint } from '../../../interfaces/strategy';
|
||||
import ConditionallyRender from '../ConditionallyRender';
|
||||
import { IConstraint } from 'interfaces/strategy';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
|
||||
import { ConstraintAccordionEdit } from './ConstraintAccordionEdit/ConstraintAccordionEdit';
|
||||
import { ConstraintAccordionView } from './ConstraintAccordionView/ConstraintAccordionView';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import classnames from 'classnames';
|
||||
import { IConstraint } from '../../../../interfaces/strategy';
|
||||
import { IConstraint } from 'interfaces/strategy';
|
||||
import { useStyles } from '../ConstraintAccordion.styles';
|
||||
import { ConstraintAccordionEditBody } from './ConstraintAccordionEditBody/ConstraintAccordionEditBody';
|
||||
import { ConstraintAccordionEditHeader } from './ConstraintAccordionEditHeader/ConstraintAccordionEditHeader';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Button, FormControlLabel, Switch } from '@material-ui/core';
|
||||
import { IConstraint } from '../../../../../interfaces/strategy';
|
||||
import { IConstraint } from 'interfaces/strategy';
|
||||
import { CANCEL } from '../ConstraintAccordionEdit';
|
||||
|
||||
import { ConstraintFormHeader } from './ConstraintFormHeader/ConstraintFormHeader';
|
||||
|
@ -2,7 +2,7 @@ import { Checkbox, FormControlLabel } from '@material-ui/core';
|
||||
import { useCommonStyles } from 'common.styles';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { ConstraintValueSearch } from '../../../ConstraintValueSearch/ConstraintValueSearch';
|
||||
import { ConstraintValueSearch } from 'component/common/ConstraintAccordion/ConstraintValueSearch/ConstraintValueSearch';
|
||||
import { ConstraintFormHeader } from '../ConstraintFormHeader/ConstraintFormHeader';
|
||||
|
||||
// Parent component
|
||||
|
@ -7,8 +7,8 @@ import {
|
||||
RadioGroup,
|
||||
Radio,
|
||||
} from '@material-ui/core';
|
||||
import { ConstraintValueSearch } from '../../../ConstraintValueSearch/ConstraintValueSearch';
|
||||
import ConditionallyRender from '../../../../ConditionallyRender';
|
||||
import { ConstraintValueSearch } from 'component/common/ConstraintAccordion/ConstraintValueSearch/ConstraintValueSearch';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import { useCommonStyles } from 'common.styles';
|
||||
|
||||
// Parent component
|
||||
|
@ -1,17 +1,17 @@
|
||||
import { IConstraint } from '../../../../../interfaces/strategy';
|
||||
import { IConstraint } from 'interfaces/strategy';
|
||||
|
||||
import { useStyles } from '../../ConstraintAccordion.styles';
|
||||
import useUnleashContext from '../../../../../hooks/api/getters/useUnleashContext/useUnleashContext';
|
||||
import GeneralSelect from '../../../GeneralSelect/GeneralSelect';
|
||||
import { ConstraintIcon } from '../../ConstraintIcon';
|
||||
import { useStyles } from 'component/common/ConstraintAccordion/ConstraintAccordion.styles';
|
||||
import useUnleashContext from 'hooks/api/getters/useUnleashContext/useUnleashContext';
|
||||
import GeneralSelect from 'component/common/GeneralSelect/GeneralSelect';
|
||||
import { ConstraintIcon } from 'component/common/ConstraintAccordion/ConstraintIcon';
|
||||
import { Help } from '@material-ui/icons';
|
||||
import ConditionallyRender from '../../../ConditionallyRender';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import {
|
||||
allOperators,
|
||||
dateOperators,
|
||||
DATE_AFTER,
|
||||
IN,
|
||||
} from '../../../../../constants/operators';
|
||||
} from 'constants/operators';
|
||||
import { SAVE } from '../ConstraintAccordionEdit';
|
||||
import { resolveText } from './helpers';
|
||||
import { oneOf } from 'utils/oneOf';
|
||||
|
@ -15,7 +15,7 @@ import {
|
||||
SEMVER_GT,
|
||||
SEMVER_LT,
|
||||
Operator,
|
||||
} from '../../../../../constants/operators';
|
||||
} from 'constants/operators';
|
||||
|
||||
export const resolveText = (operator: Operator, contextName: string) => {
|
||||
const base = `To satisfy this constraint, values passed into the SDK as ${contextName} must`;
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
AccordionDetails,
|
||||
} from '@material-ui/core';
|
||||
import { ExpandMore } from '@material-ui/icons';
|
||||
import { IConstraint } from '../../../../interfaces/strategy';
|
||||
import { IConstraint } from 'interfaces/strategy';
|
||||
|
||||
import { ConstraintAccordionViewBody } from './ConstraintAccordionViewBody/ConstraintAccordionViewBody';
|
||||
import { ConstraintAccordionViewHeader } from './ConstraintAccordionViewHeader/ConstraintAccordionViewHeader';
|
||||
@ -13,7 +13,7 @@ import {
|
||||
dateOperators,
|
||||
numOperators,
|
||||
semVerOperators,
|
||||
} from '../../../../constants/operators';
|
||||
} from 'constants/operators';
|
||||
|
||||
import { useStyles } from '../ConstraintAccordion.styles';
|
||||
interface IConstraintAccordionViewProps {
|
||||
|
@ -2,12 +2,12 @@ import { Chip } from '@material-ui/core';
|
||||
import { ImportExportOutlined, TextFormatOutlined } from '@material-ui/icons';
|
||||
import StringTruncator from 'component/common/StringTruncator/StringTruncator';
|
||||
import { useState } from 'react';
|
||||
import { stringOperators } from '../../../../../constants/operators';
|
||||
import { IConstraint } from '../../../../../interfaces/strategy';
|
||||
import { stringOperators } from 'constants/operators';
|
||||
import { IConstraint } from 'interfaces/strategy';
|
||||
import { oneOf } from 'utils/oneOf';
|
||||
import ConditionallyRender from '../../../ConditionallyRender';
|
||||
import { useStyles } from '../../ConstraintAccordion.styles';
|
||||
import { ConstraintValueSearch } from '../../ConstraintValueSearch/ConstraintValueSearch';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import { useStyles } from 'component/common/ConstraintAccordion/ConstraintAccordion.styles';
|
||||
import { ConstraintValueSearch } from 'component/common/ConstraintAccordion/ConstraintValueSearch/ConstraintValueSearch';
|
||||
import { formatConstraintValue } from 'component/common/Constraint/formatConstraintValue';
|
||||
import { useLocationSettings } from 'hooks/useLocationSettings';
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
import StringTruncator from '../../../StringTruncator/StringTruncator';
|
||||
import StringTruncator from 'component/common/StringTruncator/StringTruncator';
|
||||
import { Chip, useMediaQuery } from '@material-ui/core';
|
||||
import { ConstraintIcon } from '../../ConstraintIcon';
|
||||
import { ConstraintIcon } from 'component/common/ConstraintAccordion/ConstraintIcon';
|
||||
import { Delete, Edit } from '@material-ui/icons';
|
||||
import { IConstraint } from '../../../../../interfaces/strategy';
|
||||
import { IConstraint } from 'interfaces/strategy';
|
||||
|
||||
import { useStyles } from '../../ConstraintAccordion.styles';
|
||||
import ConditionallyRender from '../../../ConditionallyRender';
|
||||
import { useStyles } from 'component/common/ConstraintAccordion/ConstraintAccordion.styles';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import PermissionIconButton from 'component/common/PermissionIconButton/PermissionIconButton';
|
||||
import { UPDATE_FEATURE_STRATEGY } from 'component/providers/AccessProvider/permissions';
|
||||
import { useParams } from 'react-router-dom';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { TextField, InputAdornment, Chip } from '@material-ui/core';
|
||||
import { Search } from '@material-ui/icons';
|
||||
import ConditionallyRender from '../../ConditionallyRender';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
|
||||
interface IConstraintValueSearchProps {
|
||||
filter: string;
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
|
||||
import ConditionallyRender from '../ConditionallyRender/ConditionallyRender';
|
||||
import { useStyles } from './Dialogue.styles';
|
||||
import { DIALOGUE_CONFIRM_ID } from '../../../testIds';
|
||||
import { DIALOGUE_CONFIRM_ID } from 'testIds';
|
||||
|
||||
interface IDialogue {
|
||||
primaryButtonText?: string;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { CREATE_FEATURE_STRATEGY } from '../../providers/AccessProvider/permissions';
|
||||
import { CREATE_FEATURE_STRATEGY } from 'component/providers/AccessProvider/permissions';
|
||||
import Dialogue from '../Dialogue';
|
||||
import PermissionButton from '../PermissionButton/PermissionButton';
|
||||
import { useStyles } from './EnvironmentStrategyDialog.styles';
|
||||
|
@ -3,14 +3,14 @@ import { Button, IconButton } from '@material-ui/core';
|
||||
import classnames from 'classnames';
|
||||
import CloseIcon from '@material-ui/icons/Close';
|
||||
import { ReactComponent as Logo } from 'assets/icons/logoPlain.svg';
|
||||
import { useCommonStyles } from '../../../common.styles';
|
||||
import { useCommonStyles } from 'common.styles';
|
||||
import { useStyles } from './Feedback.styles';
|
||||
import AnimateOnMount from '../AnimateOnMount/AnimateOnMount';
|
||||
import ConditionallyRender from '../ConditionallyRender';
|
||||
import { formatApiPath } from 'utils/formatPath';
|
||||
import UIContext from '../../../contexts/UIContext';
|
||||
import UIContext from 'contexts/UIContext';
|
||||
import { PNPS_FEEDBACK_ID, showPnpsFeedback } from '../util';
|
||||
import { useAuthFeedback } from '../../../hooks/api/getters/useAuth/useAuthFeedback';
|
||||
import { useAuthFeedback } from 'hooks/api/getters/useAuth/useAuthFeedback';
|
||||
|
||||
interface IFeedbackProps {
|
||||
openUrl: string;
|
||||
|
@ -6,7 +6,7 @@ import { FileCopy, Info } from '@material-ui/icons';
|
||||
import ConditionallyRender from '../ConditionallyRender';
|
||||
import Loader from '../Loader/Loader';
|
||||
import copy from 'copy-to-clipboard';
|
||||
import useToast from '../../../hooks/useToast';
|
||||
import useToast from 'hooks/useToast';
|
||||
import React, { useState } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { ReactComponent as MobileGuidanceBG } from 'assets/img/mobileGuidanceBg.svg';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { FormControl, InputLabel, MenuItem, Select } from '@material-ui/core';
|
||||
import { SELECT_ITEM_ID } from '../../../testIds';
|
||||
import { SELECT_ITEM_ID } from 'testIds';
|
||||
import { KeyboardArrowDownOutlined } from '@material-ui/icons';
|
||||
|
||||
export interface ISelectOption {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { InputLabelProps, InputProps, TextField } from '@material-ui/core';
|
||||
import { INPUT_ERROR_TEXT } from '../../../testIds';
|
||||
import { INPUT_ERROR_TEXT } from 'testIds';
|
||||
import { useStyles } from './Input.styles';
|
||||
import React from 'react';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ReactComponent as NoItemsIcon } from '../../../assets/icons/addfiles.svg';
|
||||
import { ReactComponent as NoItemsIcon } from 'assets/icons/addfiles.svg';
|
||||
import { useStyles } from './NoItems.styles';
|
||||
import React from 'react';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { IconButton, Tooltip, IconButtonProps } from '@material-ui/core';
|
||||
import React, { useContext } from 'react';
|
||||
import AccessContext from '../../../contexts/AccessContext';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
|
||||
interface IPermissionIconButtonProps extends IconButtonProps {
|
||||
permission: string;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Switch, Tooltip, SwitchProps } from '@material-ui/core';
|
||||
import AccessContext from '../../../contexts/AccessContext';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import React, { useContext } from 'react';
|
||||
|
||||
interface IPermissionSwitchProps extends SwitchProps {
|
||||
|
@ -3,7 +3,7 @@ import { Alert } from '@material-ui/lab';
|
||||
import ConditionallyRender from '../ConditionallyRender';
|
||||
import { Typography } from '@material-ui/core';
|
||||
import { useStyles } from './Proclamation.styles';
|
||||
import { IProclamationToast } from '../../../interfaces/uiConfig';
|
||||
import { IProclamationToast } from 'interfaces/uiConfig';
|
||||
|
||||
interface IProclamationProps {
|
||||
toast?: IProclamationToast;
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { MenuItem } from '@material-ui/core';
|
||||
import PropTypes from 'prop-types';
|
||||
import DropdownMenu from '../DropdownMenu/DropdownMenu';
|
||||
import useProjects from '../../../hooks/api/getters/useProjects/useProjects';
|
||||
import useProjects from 'hooks/api/getters/useProjects/useProjects';
|
||||
|
||||
const ALL_PROJECTS = { id: '*', name: '> All projects' };
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import GeneralSelect from '../GeneralSelect/GeneralSelect';
|
||||
import useTagTypes from '../../../hooks/api/getters/useTagTypes/useTagTypes';
|
||||
import useTagTypes from 'hooks/api/getters/useTagTypes/useTagTypes';
|
||||
|
||||
interface ITagSelect extends React.SelectHTMLAttributes<HTMLSelectElement> {
|
||||
value: string;
|
||||
|
@ -2,11 +2,11 @@ import { useStyles } from './Toast.styles';
|
||||
import classnames from 'classnames';
|
||||
import { useContext } from 'react';
|
||||
import { IconButton } from '@material-ui/core';
|
||||
import CheckMarkBadge from '../../CheckmarkBadge/CheckMarkBadge';
|
||||
import UIContext from '../../../../contexts/UIContext';
|
||||
import ConditionallyRender from '../../ConditionallyRender';
|
||||
import CheckMarkBadge from 'component/common/CheckmarkBadge/CheckMarkBadge';
|
||||
import UIContext from 'contexts/UIContext';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import Close from '@material-ui/icons/Close';
|
||||
import { IToast } from '../../../../interfaces/toast';
|
||||
import { IToast } from 'interfaces/toast';
|
||||
|
||||
const Toast = ({ title, text, type, confetti }: IToast) => {
|
||||
const { setToast } = useContext(UIContext);
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { Portal } from '@material-ui/core';
|
||||
import { useContext, useEffect } from 'react';
|
||||
import { useCommonStyles } from '../../../common.styles';
|
||||
import UIContext from '../../../contexts/UIContext';
|
||||
import { useCommonStyles } from 'common.styles';
|
||||
import UIContext from 'contexts/UIContext';
|
||||
import { useStyles } from './ToastRenderer.styles';
|
||||
import AnimateOnMount from '../AnimateOnMount/AnimateOnMount';
|
||||
import Toast from './Toast/Toast';
|
||||
import { IToast } from '../../../interfaces/toast';
|
||||
import { IToast } from 'interfaces/toast';
|
||||
|
||||
const ToastRenderer = () => {
|
||||
const { toastData, setToast } = useContext(UIContext);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { FormControl, InputLabel, MenuItem, Select } from '@material-ui/core';
|
||||
import { SELECT_ITEM_ID } from '../../testIds';
|
||||
import { SELECT_ITEM_ID } from 'testIds';
|
||||
|
||||
export interface ISelectOption {
|
||||
key: string;
|
||||
|
@ -1,11 +1,11 @@
|
||||
import PageContent from '../../common/PageContent/PageContent';
|
||||
import HeaderTitle from '../../common/HeaderTitle';
|
||||
import ConditionallyRender from '../../common/ConditionallyRender/ConditionallyRender';
|
||||
import PageContent from 'component/common/PageContent/PageContent';
|
||||
import HeaderTitle from 'component/common/HeaderTitle';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import {
|
||||
CREATE_CONTEXT_FIELD,
|
||||
DELETE_CONTEXT_FIELD,
|
||||
UPDATE_CONTEXT_FIELD,
|
||||
} from '../../providers/AccessProvider/permissions';
|
||||
} from 'component/providers/AccessProvider/permissions';
|
||||
import {
|
||||
Button,
|
||||
IconButton,
|
||||
@ -20,12 +20,12 @@ import { Add, Album, Delete, Edit } from '@material-ui/icons';
|
||||
import { useContext, useState } from 'react';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import { useStyles } from './styles';
|
||||
import ConfirmDialogue from '../../common/Dialogue';
|
||||
import AccessContext from '../../../contexts/AccessContext';
|
||||
import useUnleashContext from '../../../hooks/api/getters/useUnleashContext/useUnleashContext';
|
||||
import useContextsApi from '../../../hooks/api/actions/useContextsApi/useContextsApi';
|
||||
import useToast from '../../../hooks/useToast';
|
||||
import { formatUnknownError } from '../../../utils/formatUnknownError';
|
||||
import ConfirmDialogue from 'component/common/Dialogue';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import useUnleashContext from 'hooks/api/getters/useUnleashContext/useUnleashContext';
|
||||
import useContextsApi from 'hooks/api/actions/useContextsApi/useContextsApi';
|
||||
import useToast from 'hooks/useToast';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
|
||||
const ContextList = () => {
|
||||
const { hasAccess } = useContext(AccessContext);
|
||||
|
@ -7,7 +7,7 @@ import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import useToast from 'hooks/useToast';
|
||||
import { useEffect } from 'react';
|
||||
import { useHistory, useParams } from 'react-router-dom';
|
||||
import { scrollToTop } from '../../common/util';
|
||||
import { scrollToTop } from 'component/common/util';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
import { ContextForm } from '../ContextForm/ContextForm';
|
||||
import { useContextForm } from '../hooks/useContextForm';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import useContextsApi from '../../../hooks/api/actions/useContextsApi/useContextsApi';
|
||||
import useContextsApi from 'hooks/api/actions/useContextsApi/useContextsApi';
|
||||
|
||||
export const useContextForm = (
|
||||
initialcontextName = '',
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import useEnvironmentForm from '../hooks/useEnvironmentForm';
|
||||
import EnvironmentForm from '../EnvironmentForm/EnvironmentForm';
|
||||
import FormTemplate from '../../common/FormTemplate/FormTemplate';
|
||||
import FormTemplate from 'component/common/FormTemplate/FormTemplate';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import { Button } from '@material-ui/core';
|
||||
import { CreateButton } from 'component/common/CreateButton/CreateButton';
|
||||
|
@ -6,7 +6,7 @@ import useProjectRolePermissions from 'hooks/api/getters/useProjectRolePermissio
|
||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import useToast from 'hooks/useToast';
|
||||
import { useHistory, useParams } from 'react-router-dom';
|
||||
import { ADMIN } from '../../providers/AccessProvider/permissions';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import EnvironmentForm from '../EnvironmentForm/EnvironmentForm';
|
||||
import useEnvironmentForm from '../hooks/useEnvironmentForm';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { Button } from '@material-ui/core';
|
||||
import { useStyles } from './EnvironmentForm.styles';
|
||||
import React from 'react';
|
||||
import Input from '../../common/Input/Input';
|
||||
import Input from 'component/common/Input/Input';
|
||||
import EnvironmentTypeSelector from './EnvironmentTypeSelector/EnvironmentTypeSelector';
|
||||
import { trim } from '../../common/util';
|
||||
import { trim } from 'component/common/util';
|
||||
|
||||
interface IEnvironmentForm {
|
||||
name: string;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { CloudCircle } from '@material-ui/icons';
|
||||
import StringTruncator from '../../../common/StringTruncator/StringTruncator';
|
||||
import StringTruncator from 'component/common/StringTruncator/StringTruncator';
|
||||
import { useStyles } from './EnvironmentCard.styles';
|
||||
|
||||
interface IEnvironmentProps {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import React from 'react';
|
||||
import { IEnvironment } from '../../../../interfaces/environments';
|
||||
import Dialogue from '../../../common/Dialogue';
|
||||
import Input from '../../../common/Input/Input';
|
||||
import { IEnvironment } from 'interfaces/environments';
|
||||
import Dialogue from 'component/common/Dialogue';
|
||||
import Input from 'component/common/Input/Input';
|
||||
import EnvironmentCard from '../EnvironmentCard/EnvironmentCard';
|
||||
import { useStyles } from './EnvironmentDeleteConfirm.styles';
|
||||
|
||||
|
@ -1,21 +1,18 @@
|
||||
import HeaderTitle from '../../common/HeaderTitle';
|
||||
import ResponsiveButton from '../../common/ResponsiveButton/ResponsiveButton';
|
||||
import HeaderTitle from 'component/common/HeaderTitle';
|
||||
import ResponsiveButton from 'component/common/ResponsiveButton/ResponsiveButton';
|
||||
import { Add } from '@material-ui/icons';
|
||||
import PageContent from '../../common/PageContent';
|
||||
import PageContent from 'component/common/PageContent';
|
||||
import { List } from '@material-ui/core';
|
||||
import { useEnvironments } from '../../../hooks/api/getters/useEnvironments/useEnvironments';
|
||||
import {
|
||||
IEnvironment,
|
||||
ISortOrderPayload,
|
||||
} from '../../../interfaces/environments';
|
||||
import { useEnvironments } from 'hooks/api/getters/useEnvironments/useEnvironments';
|
||||
import { IEnvironment, ISortOrderPayload } from 'interfaces/environments';
|
||||
import { useState } from 'react';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import EnvironmentDeleteConfirm from './EnvironmentDeleteConfirm/EnvironmentDeleteConfirm';
|
||||
import useToast from '../../../hooks/useToast';
|
||||
import useEnvironmentApi from '../../../hooks/api/actions/useEnvironmentApi/useEnvironmentApi';
|
||||
import useToast from 'hooks/useToast';
|
||||
import useEnvironmentApi from 'hooks/api/actions/useEnvironmentApi/useEnvironmentApi';
|
||||
import EnvironmentListItem from './EnvironmentListItem/EnvironmentListItem';
|
||||
import EnvironmentToggleConfirm from './EnvironmentToggleConfirm/EnvironmentToggleConfirm';
|
||||
import useProjectRolePermissions from '../../../hooks/api/getters/useProjectRolePermissions/useProjectRolePermissions';
|
||||
import useProjectRolePermissions from 'hooks/api/getters/useProjectRolePermissions/useProjectRolePermissions';
|
||||
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
|
@ -12,19 +12,19 @@ import {
|
||||
Edit,
|
||||
OfflineBolt,
|
||||
} from '@material-ui/icons';
|
||||
import ConditionallyRender from '../../../common/ConditionallyRender';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
|
||||
import { IEnvironment } from '../../../../interfaces/environments';
|
||||
import { IEnvironment } from 'interfaces/environments';
|
||||
import React, { useContext, useRef } from 'react';
|
||||
import AccessContext from '../../../../contexts/AccessContext';
|
||||
import AccessContext from 'contexts/AccessContext';
|
||||
import {
|
||||
DELETE_ENVIRONMENT,
|
||||
UPDATE_ENVIRONMENT,
|
||||
} from '../../../providers/AccessProvider/permissions';
|
||||
} from 'component/providers/AccessProvider/permissions';
|
||||
import { useDrag, useDrop, DropTargetMonitor } from 'react-dnd';
|
||||
import { XYCoord } from 'dnd-core';
|
||||
import DisabledIndicator from '../../../common/DisabledIndicator/DisabledIndicator';
|
||||
import StringTruncator from '../../../common/StringTruncator/StringTruncator';
|
||||
import DisabledIndicator from 'component/common/DisabledIndicator/DisabledIndicator';
|
||||
import StringTruncator from 'component/common/StringTruncator/StringTruncator';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
|
||||
interface IEnvironmentListItemProps {
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { capitalize } from '@material-ui/core';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import React from 'react';
|
||||
import { IEnvironment } from '../../../../interfaces/environments';
|
||||
import ConditionallyRender from '../../../common/ConditionallyRender';
|
||||
import Dialogue from '../../../common/Dialogue';
|
||||
import { IEnvironment } from 'interfaces/environments';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import Dialogue from 'component/common/Dialogue';
|
||||
import EnvironmentCard from '../EnvironmentCard/EnvironmentCard';
|
||||
|
||||
interface IEnvironmentToggleConfirmProps {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import useEnvironmentApi from '../../../hooks/api/actions/useEnvironmentApi/useEnvironmentApi';
|
||||
import useEnvironmentApi from 'hooks/api/actions/useEnvironmentApi/useEnvironmentApi';
|
||||
|
||||
const useEnvironmentForm = (initialName = '', initialType = 'development') => {
|
||||
const NAME_EXISTS_ERROR = 'Error: Environment';
|
||||
|
@ -1,7 +1,5 @@
|
||||
import { useState, useRef, useEffect } from 'react';
|
||||
|
||||
import { Link, useHistory, useParams } from 'react-router-dom';
|
||||
|
||||
import {
|
||||
Button,
|
||||
TextField,
|
||||
@ -10,17 +8,15 @@ import {
|
||||
FormControlLabel,
|
||||
} from '@material-ui/core';
|
||||
import { FileCopy } from '@material-ui/icons';
|
||||
|
||||
import { styles as commonStyles } from '../../common';
|
||||
import { styles as commonStyles } from 'component/common';
|
||||
import styles from './CopyFeature.module.scss';
|
||||
|
||||
import { trim } from '../../common/util';
|
||||
import ConditionallyRender from '../../common/ConditionallyRender';
|
||||
import { trim } from 'component/common/util';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import { getTogglePath } from '../../../utils/routePathHelpers';
|
||||
import useFeatureApi from '../../../hooks/api/actions/useFeatureApi/useFeatureApi';
|
||||
import { useFeature } from '../../../hooks/api/getters/useFeature/useFeature';
|
||||
import useUiConfig from '../../../hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import { getTogglePath } from 'utils/routePathHelpers';
|
||||
import useFeatureApi from 'hooks/api/actions/useFeatureApi/useFeatureApi';
|
||||
import { useFeature } from 'hooks/api/getters/useFeature/useFeature';
|
||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
|
||||
export const CopyFeatureToggle = () => {
|
||||
const [replaceGroupId, setReplaceGroupId] = useState(true);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import FormTemplate from '../../common/FormTemplate/FormTemplate';
|
||||
import FormTemplate from 'component/common/FormTemplate/FormTemplate';
|
||||
import { useHistory, useParams } from 'react-router-dom';
|
||||
import FeatureForm from '../FeatureForm/FeatureForm';
|
||||
import useFeatureForm from '../hooks/useFeatureForm';
|
||||
|
@ -7,18 +7,18 @@ import {
|
||||
} from '@material-ui/core';
|
||||
import { useStyles } from './FeatureForm.styles';
|
||||
import FeatureTypeSelect from '../FeatureView/FeatureSettings/FeatureSettingsMetadata/FeatureTypeSelect/FeatureTypeSelect';
|
||||
import { CF_DESC_ID, CF_NAME_ID, CF_TYPE_ID } from '../../../testIds';
|
||||
import useFeatureTypes from '../../../hooks/api/getters/useFeatureTypes/useFeatureTypes';
|
||||
import { CF_DESC_ID, CF_NAME_ID, CF_TYPE_ID } from 'testIds';
|
||||
import useFeatureTypes from 'hooks/api/getters/useFeatureTypes/useFeatureTypes';
|
||||
import { KeyboardArrowDownOutlined } from '@material-ui/icons';
|
||||
import { projectFilterGenerator } from 'utils/projectFilterGenerator';
|
||||
import FeatureProjectSelect from '../FeatureView/FeatureSettings/FeatureSettingsProject/FeatureProjectSelect/FeatureProjectSelect';
|
||||
import ConditionallyRender from '../../common/ConditionallyRender';
|
||||
import { trim } from '../../common/util';
|
||||
import Input from '../../common/Input/Input';
|
||||
import { CREATE_FEATURE } from '../../providers/AccessProvider/permissions';
|
||||
import ConditionallyRender from 'component/common/ConditionallyRender';
|
||||
import { trim } from 'component/common/util';
|
||||
import Input from 'component/common/Input/Input';
|
||||
import { CREATE_FEATURE } from 'component/providers/AccessProvider/permissions';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import React from 'react';
|
||||
import { useAuthPermissions } from '../../../hooks/api/getters/useAuth/useAuthPermissions';
|
||||
import { useAuthPermissions } from 'hooks/api/getters/useAuth/useAuthPermissions';
|
||||
|
||||
interface IFeatureToggleForm {
|
||||
type: string;
|
||||
|
@ -1,15 +1,15 @@
|
||||
import { IConstraint, IFeatureStrategy } from 'interfaces/strategy';
|
||||
import Constraint from '../../../common/Constraint/Constraint';
|
||||
import Dialogue from '../../../common/Dialogue/Dialogue';
|
||||
import Constraint from 'component/common/Constraint/Constraint';
|
||||
import Dialogue from 'component/common/Dialogue/Dialogue';
|
||||
import React, { useState } from 'react';
|
||||
import StrategyConstraints from '../../StrategyConstraints/StrategyConstraints';
|
||||
import StrategyConstraints from 'component/feature/StrategyConstraints/StrategyConstraints';
|
||||
import { List, ListItem } from '@material-ui/core';
|
||||
import produce from 'immer';
|
||||
import {
|
||||
CREATE_FEATURE_STRATEGY,
|
||||
UPDATE_FEATURE_STRATEGY,
|
||||
} from '../../../providers/AccessProvider/permissions';
|
||||
import PermissionButton from '../../../common/PermissionButton/PermissionButton';
|
||||
} from 'component/providers/AccessProvider/permissions';
|
||||
import PermissionButton from 'component/common/PermissionButton/PermissionButton';
|
||||
|
||||
interface IFeatureStrategyConstraintsProps {
|
||||
projectId: string;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user