mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-07-06 17:58:02 +02:00
optimize all imports in ui-webapp and reformat with prettier
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { NamespaceStrategies, Config } from "@scm-manager/ui-types";
|
||||
import { Level, SubmitButton, Notification } from "@scm-manager/ui-components";
|
||||
import { Config, NamespaceStrategies } from "@scm-manager/ui-types";
|
||||
import { Level, Notification, SubmitButton } from "@scm-manager/ui-components";
|
||||
import ProxySettings from "./ProxySettings";
|
||||
import GeneralSettings from "./GeneralSettings";
|
||||
import BaseUrlSettings from "./BaseUrlSettings";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Checkbox, InputField, Subtitle, AddEntryToTableField } from "@scm-manager/ui-components";
|
||||
import { AddEntryToTableField, Checkbox, InputField, Subtitle } from "@scm-manager/ui-components";
|
||||
import ProxyExcludesTable from "../table/ProxyExcludesTable";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { RemoveEntryOfTableButton, LabelWithHelpIcon } from "@scm-manager/ui-components";
|
||||
import { LabelWithHelpIcon, RemoveEntryOfTableButton } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = {
|
||||
items: string[];
|
||||
|
||||
@@ -6,8 +6,8 @@ import { Redirect, Route, Switch } from "react-router-dom";
|
||||
import { History } from "history";
|
||||
import { ExtensionPoint } from "@scm-manager/ui-extensions";
|
||||
import { Links } from "@scm-manager/ui-types";
|
||||
import { Page, Navigation, NavLink, Section, SubNavigation } from "@scm-manager/ui-components";
|
||||
import { getLinks, getAvailablePluginsLink, getInstalledPluginsLink } from "../../modules/indexResource";
|
||||
import { Navigation, NavLink, Page, Section, SubNavigation } from "@scm-manager/ui-components";
|
||||
import { getAvailablePluginsLink, getInstalledPluginsLink, getLinks } from "../../modules/indexResource";
|
||||
import AdminDetails from "./AdminDetails";
|
||||
import PluginsOverview from "../plugins/containers/PluginsOverview";
|
||||
import GlobalConfig from "./GlobalConfig";
|
||||
|
||||
@@ -2,17 +2,17 @@ import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { Config, NamespaceStrategies } from "@scm-manager/ui-types";
|
||||
import { Title, Loading, ErrorNotification } from "@scm-manager/ui-components";
|
||||
import { ErrorNotification, Loading, Title } from "@scm-manager/ui-components";
|
||||
import { getConfigLink } from "../../modules/indexResource";
|
||||
import {
|
||||
fetchConfig,
|
||||
getFetchConfigFailure,
|
||||
isFetchConfigPending,
|
||||
getConfig,
|
||||
modifyConfig,
|
||||
isModifyConfigPending,
|
||||
getConfigUpdatePermission,
|
||||
getFetchConfigFailure,
|
||||
getModifyConfigFailure,
|
||||
isFetchConfigPending,
|
||||
isModifyConfigPending,
|
||||
modifyConfig,
|
||||
modifyConfigReset
|
||||
} from "../modules/config";
|
||||
import ConfigForm from "../components/form/ConfigForm";
|
||||
|
||||
@@ -4,22 +4,22 @@ import fetchMock from "fetch-mock";
|
||||
|
||||
import reducer, {
|
||||
FETCH_CONFIG,
|
||||
FETCH_CONFIG_FAILURE,
|
||||
FETCH_CONFIG_PENDING,
|
||||
FETCH_CONFIG_SUCCESS,
|
||||
FETCH_CONFIG_FAILURE,
|
||||
MODIFY_CONFIG,
|
||||
MODIFY_CONFIG_PENDING,
|
||||
MODIFY_CONFIG_SUCCESS,
|
||||
MODIFY_CONFIG_FAILURE,
|
||||
fetchConfig,
|
||||
fetchConfigSuccess,
|
||||
getFetchConfigFailure,
|
||||
isFetchConfigPending,
|
||||
modifyConfig,
|
||||
isModifyConfigPending,
|
||||
getModifyConfigFailure,
|
||||
getConfig,
|
||||
getConfigUpdatePermission
|
||||
getConfigUpdatePermission,
|
||||
getFetchConfigFailure,
|
||||
getModifyConfigFailure,
|
||||
isFetchConfigPending,
|
||||
isModifyConfigPending,
|
||||
MODIFY_CONFIG,
|
||||
MODIFY_CONFIG_FAILURE,
|
||||
MODIFY_CONFIG_PENDING,
|
||||
MODIFY_CONFIG_SUCCESS,
|
||||
modifyConfig
|
||||
} from "./config";
|
||||
|
||||
const CONFIG_URL = "/config";
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { apiClient } from "@scm-manager/ui-components";
|
||||
import * as types from "../../modules/types";
|
||||
import { Action } from "@scm-manager/ui-types";
|
||||
import { Action, Config } from "@scm-manager/ui-types";
|
||||
import { isPending } from "../../modules/pending";
|
||||
import { getFailure } from "../../modules/failure";
|
||||
import { Dispatch } from "redux";
|
||||
import { Config } from "@scm-manager/ui-types";
|
||||
|
||||
export const FETCH_CONFIG = "scm/config/FETCH_CONFIG";
|
||||
export const FETCH_CONFIG_PENDING = `${FETCH_CONFIG}_${types.PENDING_SUFFIX}`;
|
||||
|
||||
@@ -2,17 +2,17 @@ import fetchMock from "fetch-mock";
|
||||
import configureMockStore from "redux-mock-store";
|
||||
import thunk from "redux-thunk";
|
||||
import {
|
||||
default as reducer,
|
||||
FETCH_NAMESPACESTRATEGIES_TYPES,
|
||||
FETCH_NAMESPACESTRATEGIES_TYPES_FAILURE,
|
||||
FETCH_NAMESPACESTRATEGIES_TYPES_PENDING,
|
||||
FETCH_NAMESPACESTRATEGIES_TYPES_SUCCESS,
|
||||
fetchNamespaceStrategiesIfNeeded,
|
||||
fetchNamespaceStrategiesSuccess,
|
||||
shouldFetchNamespaceStrategies,
|
||||
default as reducer,
|
||||
getFetchNamespaceStrategiesFailure,
|
||||
getNamespaceStrategies,
|
||||
isFetchNamespaceStrategiesPending,
|
||||
getFetchNamespaceStrategiesFailure
|
||||
shouldFetchNamespaceStrategies
|
||||
} from "./namespaceStrategies";
|
||||
import { MODIFY_CONFIG_SUCCESS } from "./config";
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { compose } from "redux";
|
||||
import { PendingPlugins, PluginCollection } from "@scm-manager/ui-types";
|
||||
import {
|
||||
Button,
|
||||
ButtonGroup,
|
||||
ErrorNotification,
|
||||
Loading,
|
||||
Notification,
|
||||
Subtitle,
|
||||
Title,
|
||||
Button
|
||||
Title
|
||||
} from "@scm-manager/ui-components";
|
||||
import {
|
||||
fetchPendingPlugins,
|
||||
@@ -31,7 +31,7 @@ import PluginBottomActions from "../components/PluginBottomActions";
|
||||
import ExecutePendingActionModal from "../components/ExecutePendingActionModal";
|
||||
import CancelPendingActionModal from "../components/CancelPendingActionModal";
|
||||
import UpdateAllActionModal from "../components/UpdateAllActionModal";
|
||||
import {Plugin} from "@scm-manager/ui-types/src";
|
||||
import { Plugin } from "@scm-manager/ui-types/src";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
loading: boolean;
|
||||
|
||||
@@ -2,25 +2,25 @@ import configureMockStore from "redux-mock-store";
|
||||
import thunk from "redux-thunk";
|
||||
import fetchMock from "fetch-mock";
|
||||
import reducer, {
|
||||
FETCH_PLUGINS,
|
||||
FETCH_PLUGINS_PENDING,
|
||||
FETCH_PLUGINS_SUCCESS,
|
||||
FETCH_PLUGINS_FAILURE,
|
||||
FETCH_PLUGIN,
|
||||
FETCH_PLUGIN_FAILURE,
|
||||
FETCH_PLUGIN_PENDING,
|
||||
FETCH_PLUGIN_SUCCESS,
|
||||
FETCH_PLUGIN_FAILURE,
|
||||
fetchPluginsByLink,
|
||||
fetchPluginsSuccess,
|
||||
getPluginCollection,
|
||||
isFetchPluginsPending,
|
||||
getFetchPluginsFailure,
|
||||
FETCH_PLUGINS,
|
||||
FETCH_PLUGINS_FAILURE,
|
||||
FETCH_PLUGINS_PENDING,
|
||||
FETCH_PLUGINS_SUCCESS,
|
||||
fetchPluginByLink,
|
||||
fetchPluginByName,
|
||||
fetchPluginsByLink,
|
||||
fetchPluginsSuccess,
|
||||
fetchPluginSuccess,
|
||||
getFetchPluginFailure,
|
||||
getFetchPluginsFailure,
|
||||
getPlugin,
|
||||
getPluginCollection,
|
||||
isFetchPluginPending,
|
||||
getFetchPluginFailure
|
||||
isFetchPluginsPending
|
||||
} from "./plugins";
|
||||
import { Plugin, PluginCollection } from "@scm-manager/ui-types";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { ExtensionPoint } from "@scm-manager/ui-extensions";
|
||||
import { RepositoryRole } from "@scm-manager/ui-types";
|
||||
import { Level, Button } from "@scm-manager/ui-components";
|
||||
import { Button, Level } from "@scm-manager/ui-components";
|
||||
import PermissionRoleDetailsTable from "./PermissionRoleDetailsTable";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { withRouter } from "react-router-dom";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { History } from "history";
|
||||
import { RepositoryRole } from "@scm-manager/ui-types";
|
||||
import { Level, DeleteButton, confirmAlert, ErrorNotification } from "@scm-manager/ui-components";
|
||||
import { confirmAlert, DeleteButton, ErrorNotification, Level } from "@scm-manager/ui-components";
|
||||
import { deleteRole, getDeleteRoleFailure, isDeleteRolePending } from "../modules/roles";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -3,7 +3,7 @@ import RepositoryRoleForm from "./RepositoryRoleForm";
|
||||
import { connect } from "react-redux";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { getModifyRoleFailure, isModifyRolePending, modifyRole } from "../modules/roles";
|
||||
import { ErrorNotification, Subtitle, Loading } from "@scm-manager/ui-components";
|
||||
import { ErrorNotification, Loading, Subtitle } from "@scm-manager/ui-components";
|
||||
import { RepositoryRole } from "@scm-manager/ui-types";
|
||||
import { History } from "history";
|
||||
import DeleteRepositoryRole from "./DeleteRepositoryRole";
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { withRouter, RouteComponentProps } from "react-router-dom";
|
||||
import { RouteComponentProps, withRouter } from "react-router-dom";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { History } from "history";
|
||||
import { RepositoryRole, PagedCollection } from "@scm-manager/ui-types";
|
||||
import { Title, Subtitle, Loading, Notification, LinkPaginator, urls, CreateButton } from "@scm-manager/ui-components";
|
||||
import { PagedCollection, RepositoryRole } from "@scm-manager/ui-types";
|
||||
import { CreateButton, LinkPaginator, Loading, Notification, Subtitle, Title, urls } from "@scm-manager/ui-components";
|
||||
import {
|
||||
fetchRolesByPage,
|
||||
getFetchRolesFailure,
|
||||
getRolesFromState,
|
||||
selectListAsCollection,
|
||||
isPermittedToCreateRoles,
|
||||
isFetchRolesPending,
|
||||
getFetchRolesFailure
|
||||
isPermittedToCreateRoles,
|
||||
selectListAsCollection
|
||||
} from "../modules/roles";
|
||||
import PermissionRoleTable from "../components/PermissionRoleTable";
|
||||
import { getRepositoryRolesLink } from "../../../modules/indexResource";
|
||||
|
||||
@@ -5,7 +5,7 @@ import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { History } from "history";
|
||||
import { ExtensionPoint } from "@scm-manager/ui-extensions";
|
||||
import { RepositoryRole } from "@scm-manager/ui-types";
|
||||
import { Loading, ErrorPage, Title } from "@scm-manager/ui-components";
|
||||
import { ErrorPage, Loading, Title } from "@scm-manager/ui-components";
|
||||
import { getRepositoryRolesLink } from "../../../modules/indexResource";
|
||||
import { fetchRoleByName, getFetchRoleFailure, getRoleByName, isFetchRolePending } from "../modules/roles";
|
||||
import PermissionRoleDetail from "../components/PermissionRoleDetails";
|
||||
|
||||
@@ -3,49 +3,49 @@ import thunk from "redux-thunk";
|
||||
import fetchMock from "fetch-mock";
|
||||
|
||||
import reducer, {
|
||||
FETCH_ROLES,
|
||||
FETCH_ROLES_PENDING,
|
||||
FETCH_ROLES_SUCCESS,
|
||||
FETCH_ROLES_FAILURE,
|
||||
FETCH_ROLE,
|
||||
FETCH_ROLE_PENDING,
|
||||
FETCH_ROLE_SUCCESS,
|
||||
FETCH_ROLE_FAILURE,
|
||||
CREATE_ROLE,
|
||||
CREATE_ROLE_FAILURE,
|
||||
CREATE_ROLE_PENDING,
|
||||
CREATE_ROLE_SUCCESS,
|
||||
CREATE_ROLE_FAILURE,
|
||||
MODIFY_ROLE,
|
||||
MODIFY_ROLE_PENDING,
|
||||
MODIFY_ROLE_SUCCESS,
|
||||
MODIFY_ROLE_FAILURE,
|
||||
createRole,
|
||||
DELETE_ROLE,
|
||||
DELETE_ROLE_FAILURE,
|
||||
DELETE_ROLE_PENDING,
|
||||
DELETE_ROLE_SUCCESS,
|
||||
DELETE_ROLE_FAILURE,
|
||||
fetchRoles,
|
||||
getFetchRolesFailure,
|
||||
getRolesFromState,
|
||||
isFetchRolesPending,
|
||||
fetchRolesSuccess,
|
||||
deleteRole,
|
||||
deleteRoleSuccess,
|
||||
FETCH_ROLE,
|
||||
FETCH_ROLE_FAILURE,
|
||||
FETCH_ROLE_PENDING,
|
||||
FETCH_ROLE_SUCCESS,
|
||||
FETCH_ROLES,
|
||||
FETCH_ROLES_FAILURE,
|
||||
FETCH_ROLES_PENDING,
|
||||
FETCH_ROLES_SUCCESS,
|
||||
fetchRoleByLink,
|
||||
fetchRoleByName,
|
||||
fetchRoles,
|
||||
fetchRolesSuccess,
|
||||
fetchRoleSuccess,
|
||||
isFetchRolePending,
|
||||
getFetchRoleFailure,
|
||||
createRole,
|
||||
isCreateRolePending,
|
||||
getCreateRoleFailure,
|
||||
getRoleByName,
|
||||
modifyRole,
|
||||
isModifyRolePending,
|
||||
getModifyRoleFailure,
|
||||
deleteRole,
|
||||
isDeleteRolePending,
|
||||
deleteRoleSuccess,
|
||||
getDeleteRoleFailure,
|
||||
selectListAsCollection,
|
||||
isPermittedToCreateRoles
|
||||
getFetchRoleFailure,
|
||||
getFetchRolesFailure,
|
||||
getModifyRoleFailure,
|
||||
getRoleByName,
|
||||
getRolesFromState,
|
||||
isCreateRolePending,
|
||||
isDeleteRolePending,
|
||||
isFetchRolePending,
|
||||
isFetchRolesPending,
|
||||
isModifyRolePending,
|
||||
isPermittedToCreateRoles,
|
||||
MODIFY_ROLE,
|
||||
MODIFY_ROLE_FAILURE,
|
||||
MODIFY_ROLE_PENDING,
|
||||
MODIFY_ROLE_SUCCESS,
|
||||
modifyRole,
|
||||
selectListAsCollection
|
||||
} from "./roles";
|
||||
|
||||
const role1 = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import styled from "styled-components";
|
||||
import { Image, ErrorNotification, InputField, SubmitButton, UnauthorizedError } from "@scm-manager/ui-components";
|
||||
import { ErrorNotification, Image, InputField, SubmitButton, UnauthorizedError } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
error?: Error;
|
||||
|
||||
@@ -2,9 +2,9 @@ import React from "react";
|
||||
import {
|
||||
ErrorNotification,
|
||||
InputField,
|
||||
Level,
|
||||
Notification,
|
||||
PasswordConfirmation,
|
||||
Level,
|
||||
SubmitButton
|
||||
} from "@scm-manager/ui-components";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
|
||||
@@ -4,7 +4,7 @@ import { connect } from "react-redux";
|
||||
import { compose } from "redux";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import { Loading, ErrorBoundary } from "@scm-manager/ui-components";
|
||||
import { ErrorBoundary, Loading } from "@scm-manager/ui-components";
|
||||
import {
|
||||
fetchIndexResources,
|
||||
getFetchIndexResourcesFailure,
|
||||
|
||||
@@ -3,8 +3,8 @@ import { connect } from "react-redux";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Redirect } from "react-router-dom";
|
||||
|
||||
import { logout, isAuthenticated, isLogoutPending, getLogoutFailure, isRedirecting } from "../modules/auth";
|
||||
import { Loading, ErrorPage } from "@scm-manager/ui-components";
|
||||
import { getLogoutFailure, isAuthenticated, isLogoutPending, isRedirecting, logout } from "../modules/auth";
|
||||
import { ErrorPage, Loading } from "@scm-manager/ui-components";
|
||||
import { getLogoutLink } from "../modules/indexResource";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { compose } from "redux";
|
||||
import { connect } from "react-redux";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Me } from "@scm-manager/ui-types";
|
||||
import { ErrorPage, Page, Navigation, SubNavigation, Section, NavLink } from "@scm-manager/ui-components";
|
||||
import { ErrorPage, Navigation, NavLink, Page, Section, SubNavigation } from "@scm-manager/ui-components";
|
||||
import ChangeUserPassword from "./ChangeUserPassword";
|
||||
import ProfileInfo from "./ProfileInfo";
|
||||
import { ExtensionPoint } from "@scm-manager/ui-extensions";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Me } from "@scm-manager/ui-types";
|
||||
import { MailLink, AvatarWrapper, AvatarImage } from "@scm-manager/ui-components";
|
||||
import { AvatarImage, AvatarWrapper, MailLink } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
me: Me;
|
||||
|
||||
@@ -7,13 +7,10 @@ import * as ReactDOM from "react-dom";
|
||||
import * as ReactRouterDom from "react-router-dom";
|
||||
import * as Redux from "redux";
|
||||
import * as ReactRedux from "react-redux";
|
||||
import SytleComponentsDefault from "styled-components";
|
||||
import * as SytleComponents from "styled-components";
|
||||
import SytleComponentsDefault, * as SytleComponents from "styled-components";
|
||||
import * as ReactI18Next from "react-i18next";
|
||||
import ClassNamesDefault from "classnames";
|
||||
import * as ClassNames from "classnames";
|
||||
import QueryStringDefault from "query-string";
|
||||
import * as QueryString from "query-string";
|
||||
import ClassNamesDefault, * as ClassNames from "classnames";
|
||||
import QueryStringDefault, * as QueryString from "query-string";
|
||||
import * as UIExtensions from "@scm-manager/ui-extensions";
|
||||
import * as UIComponents from "@scm-manager/ui-components";
|
||||
import { urls } from "@scm-manager/ui-components";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import thunk from "redux-thunk";
|
||||
import logger from "redux-logger";
|
||||
import { createStore, compose, applyMiddleware, combineReducers } from "redux";
|
||||
import { applyMiddleware, combineReducers, compose, createStore } from "redux";
|
||||
import users from "./users/modules/users";
|
||||
import repos from "./repos/modules/repos";
|
||||
import repositoryTypes from "./repos/modules/repositoryTypes";
|
||||
|
||||
@@ -2,14 +2,14 @@ import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Group, SelectValue } from "@scm-manager/ui-types";
|
||||
import {
|
||||
Subtitle,
|
||||
AutocompleteAddEntryToTableField,
|
||||
MemberNameTagGroup,
|
||||
Checkbox,
|
||||
InputField,
|
||||
SubmitButton,
|
||||
Textarea,
|
||||
Level,
|
||||
Checkbox
|
||||
MemberNameTagGroup,
|
||||
SubmitButton,
|
||||
Subtitle,
|
||||
Textarea
|
||||
} from "@scm-manager/ui-components";
|
||||
import * as validator from "./groupValidation";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import styled from "styled-components";
|
||||
import { Group } from "@scm-manager/ui-types";
|
||||
import { DateFromNow, Checkbox } from "@scm-manager/ui-components";
|
||||
import { Checkbox, DateFromNow } from "@scm-manager/ui-components";
|
||||
import GroupMember from "./GroupMember";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -3,10 +3,10 @@ import { connect } from "react-redux";
|
||||
import { compose } from "redux";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { History } from "history";
|
||||
import { Group, DisplayedUser } from "@scm-manager/ui-types";
|
||||
import { DisplayedUser, Group } from "@scm-manager/ui-types";
|
||||
import { Page } from "@scm-manager/ui-components";
|
||||
import { getGroupsLink, getUserAutoCompleteLink } from "../../modules/indexResource";
|
||||
import { createGroup, isCreateGroupPending, getCreateGroupFailure, createGroupReset } from "../modules/groups";
|
||||
import { createGroup, createGroupReset, getCreateGroupFailure, isCreateGroupPending } from "../modules/groups";
|
||||
import GroupForm from "../components/GroupForm";
|
||||
import { apiClient } from "@scm-manager/ui-components/src";
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { withRouter } from "react-router-dom";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { History } from "history";
|
||||
import { Group } from "@scm-manager/ui-types";
|
||||
import { Level, DeleteButton, confirmAlert, ErrorNotification } from "@scm-manager/ui-components";
|
||||
import { confirmAlert, DeleteButton, ErrorNotification, Level } from "@scm-manager/ui-components";
|
||||
import { deleteGroup, getDeleteGroupFailure, isDeleteGroupPending } from "../modules/groups";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import GroupForm from "../components/GroupForm";
|
||||
import { modifyGroup, getModifyGroupFailure, isModifyGroupPending, modifyGroupReset } from "../modules/groups";
|
||||
import { getModifyGroupFailure, isModifyGroupPending, modifyGroup, modifyGroupReset } from "../modules/groups";
|
||||
import { History } from "history";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import { Group, DisplayedUser } from "@scm-manager/ui-types";
|
||||
import { DisplayedUser, Group } from "@scm-manager/ui-types";
|
||||
import { ErrorNotification } from "@scm-manager/ui-components";
|
||||
import { getUserAutoCompleteLink } from "../../modules/indexResource";
|
||||
import DeleteGroup from "./DeleteGroup";
|
||||
|
||||
@@ -5,20 +5,20 @@ import { RouteComponentProps } from "react-router-dom";
|
||||
import { History } from "history";
|
||||
import { Group, PagedCollection } from "@scm-manager/ui-types";
|
||||
import {
|
||||
CreateButton,
|
||||
LinkPaginator,
|
||||
Notification,
|
||||
OverviewPageActions,
|
||||
Page,
|
||||
PageActions,
|
||||
OverviewPageActions,
|
||||
Notification,
|
||||
LinkPaginator,
|
||||
urls,
|
||||
CreateButton
|
||||
urls
|
||||
} from "@scm-manager/ui-components";
|
||||
import { getGroupsLink } from "../../modules/indexResource";
|
||||
import {
|
||||
fetchGroupsByPage,
|
||||
getFetchGroupsFailure,
|
||||
getGroupsFromState,
|
||||
isFetchGroupsPending,
|
||||
getFetchGroupsFailure,
|
||||
isPermittedToCreateGroups,
|
||||
selectListAsCollection
|
||||
} from "../modules/groups";
|
||||
|
||||
@@ -5,9 +5,9 @@ import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { History } from "history";
|
||||
import { ExtensionPoint } from "@scm-manager/ui-extensions";
|
||||
import { Group } from "@scm-manager/ui-types";
|
||||
import { Page, ErrorPage, Loading, Navigation, SubNavigation, Section, NavLink } from "@scm-manager/ui-components";
|
||||
import { ErrorPage, Loading, Navigation, NavLink, Page, Section, SubNavigation } from "@scm-manager/ui-components";
|
||||
import { getGroupsLink } from "../../modules/indexResource";
|
||||
import { fetchGroupByName, getGroupByName, isFetchGroupPending, getFetchGroupFailure } from "../modules/groups";
|
||||
import { fetchGroupByName, getFetchGroupFailure, getGroupByName, isFetchGroupPending } from "../modules/groups";
|
||||
import { Details } from "./../components/table";
|
||||
import { EditGroupNavLink, SetPermissionsNavLink } from "./../components/navLinks";
|
||||
import EditGroup from "./EditGroup";
|
||||
|
||||
@@ -3,48 +3,49 @@ import thunk from "redux-thunk";
|
||||
import fetchMock from "fetch-mock";
|
||||
|
||||
import reducer, {
|
||||
fetchGroups,
|
||||
FETCH_GROUPS,
|
||||
FETCH_GROUPS_PENDING,
|
||||
FETCH_GROUPS_SUCCESS,
|
||||
FETCH_GROUPS_FAILURE,
|
||||
fetchGroupsSuccess,
|
||||
isPermittedToCreateGroups,
|
||||
getGroupsFromState,
|
||||
getFetchGroupsFailure,
|
||||
isFetchGroupsPending,
|
||||
selectListAsCollection,
|
||||
fetchGroupByLink,
|
||||
fetchGroupByName,
|
||||
FETCH_GROUP_PENDING,
|
||||
FETCH_GROUP_SUCCESS,
|
||||
FETCH_GROUP_FAILURE,
|
||||
fetchGroupSuccess,
|
||||
getFetchGroupFailure,
|
||||
FETCH_GROUP,
|
||||
isFetchGroupPending,
|
||||
getGroupByName,
|
||||
createGroup,
|
||||
CREATE_GROUP_SUCCESS,
|
||||
CREATE_GROUP_PENDING,
|
||||
CREATE_GROUP_FAILURE,
|
||||
isCreateGroupPending,
|
||||
CREATE_GROUP,
|
||||
getCreateGroupFailure,
|
||||
deleteGroup,
|
||||
CREATE_GROUP_FAILURE,
|
||||
CREATE_GROUP_PENDING,
|
||||
CREATE_GROUP_SUCCESS,
|
||||
createGroup,
|
||||
DELETE_GROUP,
|
||||
DELETE_GROUP_FAILURE,
|
||||
DELETE_GROUP_PENDING,
|
||||
DELETE_GROUP_SUCCESS,
|
||||
DELETE_GROUP_FAILURE,
|
||||
DELETE_GROUP,
|
||||
deleteGroup,
|
||||
deleteGroupSuccess,
|
||||
isDeleteGroupPending,
|
||||
FETCH_GROUP,
|
||||
FETCH_GROUP_FAILURE,
|
||||
FETCH_GROUP_PENDING,
|
||||
FETCH_GROUP_SUCCESS,
|
||||
FETCH_GROUPS,
|
||||
FETCH_GROUPS_FAILURE,
|
||||
FETCH_GROUPS_PENDING,
|
||||
FETCH_GROUPS_SUCCESS,
|
||||
fetchGroupByLink,
|
||||
fetchGroupByName,
|
||||
fetchGroups,
|
||||
fetchGroupsSuccess,
|
||||
fetchGroupSuccess,
|
||||
getCreateGroupFailure,
|
||||
getCreateGroupLink,
|
||||
getDeleteGroupFailure,
|
||||
modifyGroup,
|
||||
getFetchGroupFailure,
|
||||
getFetchGroupsFailure,
|
||||
getGroupByName,
|
||||
getGroupsFromState,
|
||||
isCreateGroupPending,
|
||||
isDeleteGroupPending,
|
||||
isFetchGroupPending,
|
||||
isFetchGroupsPending,
|
||||
isPermittedToCreateGroups,
|
||||
MODIFY_GROUP_FAILURE,
|
||||
MODIFY_GROUP_PENDING,
|
||||
MODIFY_GROUP_SUCCESS,
|
||||
MODIFY_GROUP_FAILURE,
|
||||
getCreateGroupLink
|
||||
modifyGroup,
|
||||
selectListAsCollection
|
||||
} from "./groups";
|
||||
|
||||
const GROUPS_URL = "/api/v2/groups";
|
||||
const URL_HUMAN_GROUP = "http://localhost:8081/api/v2/groups/humanGroup";
|
||||
const URL = "/groups";
|
||||
|
||||
@@ -3,7 +3,7 @@ import { isPending } from "../../modules/pending";
|
||||
import { getFailure } from "../../modules/failure";
|
||||
import * as types from "../../modules/types";
|
||||
import { combineReducers, Dispatch } from "redux";
|
||||
import { Action, PagedCollection, Group } from "@scm-manager/ui-types";
|
||||
import { Action, Group, PagedCollection } from "@scm-manager/ui-types";
|
||||
|
||||
export const FETCH_GROUPS = "scm/groups/FETCH_GROUPS";
|
||||
export const FETCH_GROUPS_PENDING = `${FETCH_GROUPS}_${types.PENDING_SUFFIX}`;
|
||||
|
||||
@@ -2,29 +2,29 @@ import configureMockStore from "redux-mock-store";
|
||||
import thunk from "redux-thunk";
|
||||
import fetchMock from "fetch-mock";
|
||||
import reducer, {
|
||||
FETCH_INDEXRESOURCES,
|
||||
FETCH_INDEXRESOURCES_FAILURE,
|
||||
FETCH_INDEXRESOURCES_PENDING,
|
||||
FETCH_INDEXRESOURCES_SUCCESS,
|
||||
FETCH_INDEXRESOURCES_FAILURE,
|
||||
fetchIndexResources,
|
||||
fetchIndexResourcesSuccess,
|
||||
FETCH_INDEXRESOURCES,
|
||||
isFetchIndexResourcesPending,
|
||||
getFetchIndexResourcesFailure,
|
||||
getUiPluginsLink,
|
||||
getMeLink,
|
||||
getLogoutLink,
|
||||
getLoginLink,
|
||||
getUsersLink,
|
||||
getConfigLink,
|
||||
getRepositoriesLink,
|
||||
getHgConfigLink,
|
||||
getFetchIndexResourcesFailure,
|
||||
getGitConfigLink,
|
||||
getSvnConfigLink,
|
||||
getLinks,
|
||||
getGroupAutoCompleteLink,
|
||||
getGroupsLink,
|
||||
getHgConfigLink,
|
||||
getLinkCollection,
|
||||
getLinks,
|
||||
getLoginLink,
|
||||
getLogoutLink,
|
||||
getMeLink,
|
||||
getRepositoriesLink,
|
||||
getSvnConfigLink,
|
||||
getUiPluginsLink,
|
||||
getUserAutoCompleteLink,
|
||||
getGroupAutoCompleteLink
|
||||
getUsersLink,
|
||||
isFetchIndexResourcesPending
|
||||
} from "./indexResource";
|
||||
|
||||
const indexResourcesUnauthenticated = {
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Link } from "@scm-manager/ui-types";
|
||||
import { Notification, ErrorNotification, SubmitButton, Level } from "@scm-manager/ui-components";
|
||||
import { ErrorNotification, Level, Notification, SubmitButton } from "@scm-manager/ui-components";
|
||||
import { getLink } from "../../modules/indexResource";
|
||||
import { loadPermissionsForEntity, setPermissions } from "./handlePermissions";
|
||||
import PermissionsWrapper from "./PermissionsWrapper";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Repository, Branch } from "@scm-manager/ui-types";
|
||||
import { ButtonAddons, Button } from "@scm-manager/ui-components";
|
||||
import { Branch, Repository } from "@scm-manager/ui-types";
|
||||
import { Button, ButtonAddons } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
repository: Repository;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { Repository, Branch } from "@scm-manager/ui-types";
|
||||
import { Branch, Repository } from "@scm-manager/ui-types";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import BranchButtonGroup from "./BranchButtonGroup";
|
||||
import DefaultBranchTag from "./DefaultBranchTag";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Repository, Branch, BranchRequest } from "@scm-manager/ui-types";
|
||||
import { Select, InputField, Level, SubmitButton, validation as validator } from "@scm-manager/ui-components";
|
||||
import { Branch, BranchRequest, Repository } from "@scm-manager/ui-types";
|
||||
import { InputField, Level, Select, SubmitButton, validation as validator } from "@scm-manager/ui-components";
|
||||
import { orderBranches } from "../util/orderBranches";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import BranchDetail from "./BranchDetail";
|
||||
import { ExtensionPoint } from "@scm-manager/ui-extensions";
|
||||
import { Repository, Branch } from "@scm-manager/ui-types";
|
||||
import { Branch, Repository } from "@scm-manager/ui-types";
|
||||
|
||||
type Props = {
|
||||
repository: Repository;
|
||||
|
||||
@@ -3,11 +3,10 @@ import BranchView from "../components/BranchView";
|
||||
import { connect } from "react-redux";
|
||||
import { compose } from "redux";
|
||||
import { Redirect, Route, Switch, withRouter } from "react-router-dom";
|
||||
import { Repository, Branch } from "@scm-manager/ui-types";
|
||||
import { Branch, Repository } from "@scm-manager/ui-types";
|
||||
import { fetchBranch, getBranch, getFetchBranchFailure, isFetchBranchPending } from "../modules/branches";
|
||||
import { ErrorNotification, Loading } from "@scm-manager/ui-components";
|
||||
import { ErrorNotification, Loading, NotFoundError } from "@scm-manager/ui-components";
|
||||
import { History } from "history";
|
||||
import { NotFoundError } from "@scm-manager/ui-components";
|
||||
import queryString from "query-string";
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -4,19 +4,19 @@ import { withRouter } from "react-router-dom";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import queryString from "query-string";
|
||||
import { History } from "history";
|
||||
import { Repository, Branch, BranchRequest } from "@scm-manager/ui-types";
|
||||
import { Branch, BranchRequest, Repository } from "@scm-manager/ui-types";
|
||||
import { ErrorNotification, Loading, Subtitle } from "@scm-manager/ui-components";
|
||||
import BranchForm from "../components/BranchForm";
|
||||
import {
|
||||
fetchBranches,
|
||||
getBranches,
|
||||
getBranchCreateLink,
|
||||
createBranch,
|
||||
createBranchReset,
|
||||
isCreateBranchPending,
|
||||
fetchBranches,
|
||||
getBranchCreateLink,
|
||||
getBranches,
|
||||
getCreateBranchFailure,
|
||||
isFetchBranchesPending,
|
||||
getFetchBranchesFailure
|
||||
getFetchBranchesFailure,
|
||||
isCreateBranchPending,
|
||||
isFetchBranchesPending
|
||||
} from "../modules/branches";
|
||||
import { compose } from "redux";
|
||||
|
||||
|
||||
@@ -2,27 +2,27 @@ import configureMockStore from "redux-mock-store";
|
||||
import thunk from "redux-thunk";
|
||||
import fetchMock from "fetch-mock";
|
||||
import reducer, {
|
||||
FETCH_BRANCHES,
|
||||
FETCH_BRANCHES_FAILURE,
|
||||
FETCH_BRANCHES_PENDING,
|
||||
FETCH_BRANCHES_SUCCESS,
|
||||
FETCH_BRANCH_PENDING,
|
||||
FETCH_BRANCH_SUCCESS,
|
||||
FETCH_BRANCH_FAILURE,
|
||||
CREATE_BRANCH,
|
||||
CREATE_BRANCH_FAILURE,
|
||||
CREATE_BRANCH_PENDING,
|
||||
CREATE_BRANCH_SUCCESS,
|
||||
fetchBranches,
|
||||
createBranch,
|
||||
FETCH_BRANCH_FAILURE,
|
||||
FETCH_BRANCH_PENDING,
|
||||
FETCH_BRANCH_SUCCESS,
|
||||
FETCH_BRANCHES,
|
||||
FETCH_BRANCHES_FAILURE,
|
||||
FETCH_BRANCHES_PENDING,
|
||||
FETCH_BRANCHES_SUCCESS,
|
||||
fetchBranch,
|
||||
fetchBranches,
|
||||
fetchBranchSuccess,
|
||||
getBranch,
|
||||
getBranches,
|
||||
getFetchBranchesFailure,
|
||||
isFetchBranchesPending,
|
||||
createBranch,
|
||||
isCreateBranchPending,
|
||||
getCreateBranchFailure,
|
||||
getFetchBranchesFailure,
|
||||
isCreateBranchPending,
|
||||
isFetchBranchesPending,
|
||||
isPermittedToCreateBranches
|
||||
} from "./branches";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FAILURE_SUFFIX, PENDING_SUFFIX, SUCCESS_SUFFIX, RESET_SUFFIX } from "../../../modules/types";
|
||||
import { FAILURE_SUFFIX, PENDING_SUFFIX, RESET_SUFFIX, SUCCESS_SUFFIX } from "../../../modules/types";
|
||||
import { apiClient } from "@scm-manager/ui-components";
|
||||
import { Action, Branch, BranchRequest, Repository } from "@scm-manager/ui-types";
|
||||
import { isPending } from "../../../modules/pending";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { shallow, mount } from "@scm-manager/ui-tests/enzyme-router";
|
||||
import { mount, shallow } from "@scm-manager/ui-tests/enzyme-router";
|
||||
import "@scm-manager/ui-tests/enzyme";
|
||||
import "@scm-manager/ui-tests/i18n";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Repository } from "@scm-manager/ui-types";
|
||||
import { MailLink, DateFromNow } from "@scm-manager/ui-components";
|
||||
import { DateFromNow, MailLink } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
repository: Repository;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { shallow, mount } from "@scm-manager/ui-tests/enzyme-router";
|
||||
import { mount, shallow } from "@scm-manager/ui-tests/enzyme-router";
|
||||
import "@scm-manager/ui-tests/i18n";
|
||||
import RepositoryNavLink from "./RepositoryNavLink";
|
||||
|
||||
|
||||
@@ -5,16 +5,16 @@ import styled from "styled-components";
|
||||
import { ExtensionPoint } from "@scm-manager/ui-extensions";
|
||||
import { Changeset, Repository, Tag } from "@scm-manager/ui-types";
|
||||
import {
|
||||
DateFromNow,
|
||||
ChangesetId,
|
||||
ChangesetTag,
|
||||
AvatarImage,
|
||||
AvatarWrapper,
|
||||
Button,
|
||||
ChangesetAuthor,
|
||||
ChangesetDiff,
|
||||
AvatarWrapper,
|
||||
AvatarImage,
|
||||
ChangesetId,
|
||||
changesets,
|
||||
Level,
|
||||
Button
|
||||
ChangesetTag,
|
||||
DateFromNow,
|
||||
Level
|
||||
} from "@scm-manager/ui-components";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { ExtensionPoint } from "@scm-manager/ui-extensions";
|
||||
import { Repository, RepositoryType } from "@scm-manager/ui-types";
|
||||
import { Subtitle, InputField, Select, Textarea, Level, SubmitButton } from "@scm-manager/ui-components";
|
||||
import { InputField, Level, Select, SubmitButton, Subtitle, Textarea } from "@scm-manager/ui-components";
|
||||
import * as validator from "./repositoryValidation";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
import RepositoryForm from "./RepositoryForm";
|
||||
|
||||
export default RepositoryForm;
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
import RepositoryList from "./RepositoryList";
|
||||
|
||||
export default RepositoryList;
|
||||
|
||||
@@ -5,10 +5,10 @@ import { withRouter } from "react-router-dom";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Branch, Changeset, PagedCollection, Repository } from "@scm-manager/ui-types";
|
||||
import {
|
||||
ChangesetList,
|
||||
ErrorNotification,
|
||||
getPageFromMatch,
|
||||
LinkPaginator,
|
||||
ChangesetList,
|
||||
Loading,
|
||||
Notification
|
||||
} from "@scm-manager/ui-components";
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { History } from "history";
|
||||
import { Repository, RepositoryType, NamespaceStrategies } from "@scm-manager/ui-types";
|
||||
import { NamespaceStrategies, Repository, RepositoryType } from "@scm-manager/ui-types";
|
||||
import { Page } from "@scm-manager/ui-components";
|
||||
import {
|
||||
fetchRepositoryTypesIfNeeded,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { withRouter } from "react-router-dom";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { History } from "history";
|
||||
import { Repository } from "@scm-manager/ui-types";
|
||||
import { Level, DeleteButton, confirmAlert, ErrorNotification } from "@scm-manager/ui-components";
|
||||
import { confirmAlert, DeleteButton, ErrorNotification, Level } from "@scm-manager/ui-components";
|
||||
import { deleteRepo, getDeleteRepoFailure, isDeleteRepoPending } from "../modules/repos";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { withRouter } from "react-router-dom";
|
||||
import RepositoryForm from "../components/form";
|
||||
import DeleteRepo from "./DeleteRepo";
|
||||
import { Repository } from "@scm-manager/ui-types";
|
||||
import { modifyRepo, isModifyRepoPending, getModifyRepoFailure, modifyRepoReset } from "../modules/repos";
|
||||
import { getModifyRepoFailure, isModifyRepoPending, modifyRepo, modifyRepoReset } from "../modules/repos";
|
||||
import { History } from "history";
|
||||
import { ErrorNotification } from "@scm-manager/ui-components";
|
||||
import { ExtensionPoint } from "@scm-manager/ui-extensions";
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { withRouter, RouteComponentProps } from "react-router-dom";
|
||||
import { RouteComponentProps, withRouter } from "react-router-dom";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { History } from "history";
|
||||
import { RepositoryCollection } from "@scm-manager/ui-types";
|
||||
import {
|
||||
CreateButton,
|
||||
LinkPaginator,
|
||||
Notification,
|
||||
OverviewPageActions,
|
||||
Page,
|
||||
PageActions,
|
||||
OverviewPageActions,
|
||||
CreateButton,
|
||||
Notification,
|
||||
LinkPaginator,
|
||||
urls
|
||||
} from "@scm-manager/ui-components";
|
||||
import { getRepositoriesLink } from "../../modules/indexResource";
|
||||
@@ -23,21 +23,22 @@ import {
|
||||
} from "../modules/repos";
|
||||
import RepositoryList from "../components/list";
|
||||
|
||||
type Props = WithTranslation & RouteComponentProps & {
|
||||
loading: boolean;
|
||||
error: Error;
|
||||
showCreateButton: boolean;
|
||||
collection: RepositoryCollection;
|
||||
page: number;
|
||||
reposLink: string;
|
||||
type Props = WithTranslation &
|
||||
RouteComponentProps & {
|
||||
loading: boolean;
|
||||
error: Error;
|
||||
showCreateButton: boolean;
|
||||
collection: RepositoryCollection;
|
||||
page: number;
|
||||
reposLink: string;
|
||||
|
||||
// context props
|
||||
history: History;
|
||||
location: any;
|
||||
// context props
|
||||
history: History;
|
||||
location: any;
|
||||
|
||||
// dispatched functions
|
||||
fetchReposByPage: (link: string, page: number, filter?: string) => void;
|
||||
};
|
||||
// dispatched functions
|
||||
fetchReposByPage: (link: string, page: number, filter?: string) => void;
|
||||
};
|
||||
|
||||
class Overview extends React.Component<Props> {
|
||||
componentDidMount() {
|
||||
|
||||
@@ -2,50 +2,50 @@ import configureMockStore from "redux-mock-store";
|
||||
import thunk from "redux-thunk";
|
||||
import fetchMock from "fetch-mock";
|
||||
import reducer, {
|
||||
FETCH_REPOS_PENDING,
|
||||
FETCH_REPOS_SUCCESS,
|
||||
fetchRepos,
|
||||
FETCH_REPOS_FAILURE,
|
||||
fetchReposSuccess,
|
||||
getRepositoryCollection,
|
||||
FETCH_REPOS,
|
||||
isFetchReposPending,
|
||||
getFetchReposFailure,
|
||||
fetchReposByLink,
|
||||
fetchReposByPage,
|
||||
FETCH_REPO,
|
||||
fetchRepoByLink,
|
||||
fetchRepoByName,
|
||||
FETCH_REPO_PENDING,
|
||||
FETCH_REPO_SUCCESS,
|
||||
FETCH_REPO_FAILURE,
|
||||
fetchRepoSuccess,
|
||||
getRepository,
|
||||
isFetchRepoPending,
|
||||
getFetchRepoFailure,
|
||||
CREATE_REPO,
|
||||
CREATE_REPO_FAILURE,
|
||||
CREATE_REPO_PENDING,
|
||||
CREATE_REPO_SUCCESS,
|
||||
createRepo,
|
||||
CREATE_REPO_FAILURE,
|
||||
isCreateRepoPending,
|
||||
CREATE_REPO,
|
||||
getCreateRepoFailure,
|
||||
isAbleToCreateRepos,
|
||||
DELETE_REPO,
|
||||
DELETE_REPO_FAILURE,
|
||||
DELETE_REPO_PENDING,
|
||||
DELETE_REPO_SUCCESS,
|
||||
deleteRepo,
|
||||
DELETE_REPO_PENDING,
|
||||
DELETE_REPO_FAILURE,
|
||||
isDeleteRepoPending,
|
||||
FETCH_REPO,
|
||||
FETCH_REPO_FAILURE,
|
||||
FETCH_REPO_PENDING,
|
||||
FETCH_REPO_SUCCESS,
|
||||
FETCH_REPOS,
|
||||
FETCH_REPOS_FAILURE,
|
||||
FETCH_REPOS_PENDING,
|
||||
FETCH_REPOS_SUCCESS,
|
||||
fetchRepoByLink,
|
||||
fetchRepoByName,
|
||||
fetchRepos,
|
||||
fetchReposByLink,
|
||||
fetchReposByPage,
|
||||
fetchReposSuccess,
|
||||
fetchRepoSuccess,
|
||||
getCreateRepoFailure,
|
||||
getDeleteRepoFailure,
|
||||
modifyRepo,
|
||||
getFetchRepoFailure,
|
||||
getFetchReposFailure,
|
||||
getModifyRepoFailure,
|
||||
getPermissionsLink,
|
||||
getRepository,
|
||||
getRepositoryCollection,
|
||||
isAbleToCreateRepos,
|
||||
isCreateRepoPending,
|
||||
isDeleteRepoPending,
|
||||
isFetchRepoPending,
|
||||
isFetchReposPending,
|
||||
isModifyRepoPending,
|
||||
MODIFY_REPO,
|
||||
MODIFY_REPO_FAILURE,
|
||||
MODIFY_REPO_PENDING,
|
||||
MODIFY_REPO_SUCCESS,
|
||||
MODIFY_REPO_FAILURE,
|
||||
MODIFY_REPO,
|
||||
isModifyRepoPending,
|
||||
getModifyRepoFailure,
|
||||
getPermissionsLink
|
||||
modifyRepo
|
||||
} from "./repos";
|
||||
import { Repository, RepositoryCollection } from "@scm-manager/ui-types";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fetchMock from "fetch-mock";
|
||||
import configureMockStore from "redux-mock-store";
|
||||
import thunk from "redux-thunk";
|
||||
import {
|
||||
import reducer, {
|
||||
FETCH_REPOSITORY_TYPES,
|
||||
FETCH_REPOSITORY_TYPES_FAILURE,
|
||||
FETCH_REPOSITORY_TYPES_PENDING,
|
||||
@@ -13,7 +13,6 @@ import {
|
||||
isFetchRepositoryTypesPending,
|
||||
shouldFetchRepositoryTypes
|
||||
} from "./repositoryTypes";
|
||||
import reducer from "./repositoryTypes";
|
||||
|
||||
const git = {
|
||||
name: "git",
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import React from "react";
|
||||
import { shallow, mount } from "@scm-manager/ui-tests/enzyme-router";
|
||||
import { mount, shallow } from "@scm-manager/ui-tests/enzyme-router";
|
||||
import "@scm-manager/ui-tests/enzyme";
|
||||
import "@scm-manager/ui-tests/i18n";
|
||||
import DeletePermissionButton from "./DeletePermissionButton";
|
||||
|
||||
import { confirmAlert } from "@scm-manager/ui-components";
|
||||
|
||||
jest.mock("@scm-manager/ui-components", () => ({
|
||||
confirmAlert: jest.fn(),
|
||||
DeleteButton: require.requireActual("@scm-manager/ui-components").DeleteButton
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { ButtonGroup, Button, SubmitButton, Modal } from "@scm-manager/ui-components";
|
||||
import { Button, ButtonGroup, Modal, SubmitButton } from "@scm-manager/ui-components";
|
||||
import PermissionCheckbox from "../../../permissions/components/PermissionCheckbox";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -5,8 +5,8 @@ import {
|
||||
Button,
|
||||
GroupAutocomplete,
|
||||
LabelWithHelpIcon,
|
||||
Radio,
|
||||
Level,
|
||||
Radio,
|
||||
SubmitButton,
|
||||
Subtitle,
|
||||
UserAutocomplete
|
||||
|
||||
@@ -3,14 +3,14 @@ import { connect } from "react-redux";
|
||||
import { History } from "history";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import styled from "styled-components";
|
||||
import { RepositoryRole, Permission } from "@scm-manager/ui-types";
|
||||
import { Permission, RepositoryRole } from "@scm-manager/ui-types";
|
||||
import { Button, Icon } from "@scm-manager/ui-components";
|
||||
import {
|
||||
modifyPermission,
|
||||
isModifyPermissionPending,
|
||||
deletePermission,
|
||||
findVerbsForRole,
|
||||
isDeletePermissionPending,
|
||||
findVerbsForRole
|
||||
isModifyPermissionPending,
|
||||
modifyPermission
|
||||
} from "../modules/permissions";
|
||||
import DeletePermissionButton from "../components/buttons/DeletePermissionButton";
|
||||
import RoleSelector from "../components/RoleSelector";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Action } from "@scm-manager/ui-components";
|
||||
import { apiClient } from "@scm-manager/ui-components";
|
||||
import { Action, apiClient } from "@scm-manager/ui-components";
|
||||
import * as types from "../../../modules/types";
|
||||
import { RepositoryRole, Permission, PermissionCollection, PermissionCreateEntry } from "@scm-manager/ui-types";
|
||||
import { Permission, PermissionCollection, PermissionCreateEntry, RepositoryRole } from "@scm-manager/ui-types";
|
||||
import { isPending } from "../../../modules/pending";
|
||||
import { getFailure } from "../../../modules/failure";
|
||||
import { Dispatch } from "redux";
|
||||
|
||||
@@ -5,9 +5,9 @@ import { withRouter } from "react-router-dom";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import styled from "styled-components";
|
||||
import { binder } from "@scm-manager/ui-extensions";
|
||||
import { Repository, File } from "@scm-manager/ui-types";
|
||||
import { File, Repository } from "@scm-manager/ui-types";
|
||||
import { ErrorNotification, Loading, Notification } from "@scm-manager/ui-components";
|
||||
import { getFetchSourcesFailure, isFetchSourcesPending, getSources, fetchSources } from "../modules/sources";
|
||||
import { fetchSources, getFetchSourcesFailure, getSources, isFetchSourcesPending } from "../modules/sources";
|
||||
import FileTreeLeaf from "./FileTreeLeaf";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { ButtonAddons, Button } from "@scm-manager/ui-components";
|
||||
import { Button, ButtonAddons } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
className?: string;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { apiClient, SyntaxHighlighter } from "@scm-manager/ui-components";
|
||||
import { apiClient, ErrorNotification, Loading, SyntaxHighlighter } from "@scm-manager/ui-components";
|
||||
import { File } from "@scm-manager/ui-types";
|
||||
import { ErrorNotification, Loading } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
file: File;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { File, Changeset, Repository, PagedCollection } from "@scm-manager/ui-types";
|
||||
import { ErrorNotification, Loading, StatePaginator, ChangesetList } from "@scm-manager/ui-components";
|
||||
import { Changeset, File, PagedCollection, Repository } from "@scm-manager/ui-types";
|
||||
import { ChangesetList, ErrorNotification, Loading, StatePaginator } from "@scm-manager/ui-components";
|
||||
import { getHistory } from "./history";
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
import React from "react";
|
||||
import { connect, Dispatch, DispatchProp, MapDispatchToProps } from "react-redux";
|
||||
import { connect } from "react-redux";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Branch, Repository } from "@scm-manager/ui-types";
|
||||
import { Breadcrumb, ErrorNotification, Loading } from "@scm-manager/ui-components";
|
||||
import FileTree from "../components/FileTree";
|
||||
import {
|
||||
fetchBranches,
|
||||
getBranches,
|
||||
getFetchBranchesFailure,
|
||||
isFetchBranchesPending
|
||||
} from "../../branches/modules/branches";
|
||||
import { getFetchBranchesFailure, isFetchBranchesPending } from "../../branches/modules/branches";
|
||||
import { compose } from "redux";
|
||||
import Content from "./Content";
|
||||
import { fetchSources, getSources, isDirectory } from "../modules/sources";
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import { Repository, File } from "@scm-manager/ui-types";
|
||||
import { File, Repository } from "@scm-manager/ui-types";
|
||||
import configureMockStore from "redux-mock-store";
|
||||
import thunk from "redux-thunk";
|
||||
import fetchMock from "fetch-mock";
|
||||
import {
|
||||
default as reducer,
|
||||
FETCH_SOURCES,
|
||||
FETCH_SOURCES_FAILURE,
|
||||
FETCH_SOURCES_PENDING,
|
||||
FETCH_SOURCES_SUCCESS,
|
||||
fetchSources,
|
||||
getFetchSourcesFailure,
|
||||
isFetchSourcesPending,
|
||||
default as reducer,
|
||||
getSources,
|
||||
fetchSourcesSuccess,
|
||||
isDirectory
|
||||
getFetchSourcesFailure,
|
||||
getSources,
|
||||
isDirectory,
|
||||
isFetchSourcesPending
|
||||
} from "./sources";
|
||||
|
||||
const sourcesUrl = "http://localhost:8081/scm/rest/api/v2/repositories/scm/core/sources/";
|
||||
@@ -198,7 +198,7 @@ describe("selector tests", () => {
|
||||
const state = {
|
||||
sources: {
|
||||
"scm/core/abc/src/main/package.json": {
|
||||
sources: {noDirectory}
|
||||
sources: { noDirectory }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as types from "../../../modules/types";
|
||||
import { Repository, File, Action, Link } from "@scm-manager/ui-types";
|
||||
import { Action, File, Link, Repository } from "@scm-manager/ui-types";
|
||||
import { apiClient } from "@scm-manager/ui-components";
|
||||
import { isPending } from "../../../modules/pending";
|
||||
import { getFailure } from "../../../modules/failure";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { User } from "@scm-manager/ui-types";
|
||||
import { Level, SubmitButton, Notification, ErrorNotification, PasswordConfirmation } from "@scm-manager/ui-components";
|
||||
import { ErrorNotification, Level, Notification, PasswordConfirmation, SubmitButton } from "@scm-manager/ui-components";
|
||||
import { setPassword } from "./setPassword";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -2,12 +2,12 @@ import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { User } from "@scm-manager/ui-types";
|
||||
import {
|
||||
Subtitle,
|
||||
Checkbox,
|
||||
InputField,
|
||||
PasswordConfirmation,
|
||||
Level,
|
||||
PasswordConfirmation,
|
||||
SubmitButton,
|
||||
Subtitle,
|
||||
validation as validator
|
||||
} from "@scm-manager/ui-components";
|
||||
import * as userValidator from "./userValidation";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { User } from "@scm-manager/ui-types";
|
||||
import { Checkbox, MailLink, DateFromNow } from "@scm-manager/ui-components";
|
||||
import { Checkbox, DateFromNow, MailLink } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
user: User;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { History } from "history";
|
||||
import { User } from "@scm-manager/ui-types";
|
||||
import { Page } from "@scm-manager/ui-components";
|
||||
import { getUsersLink } from "../../modules/indexResource";
|
||||
import { createUser, createUserReset, isCreateUserPending, getCreateUserFailure } from "../modules/users";
|
||||
import { createUser, createUserReset, getCreateUserFailure, isCreateUserPending } from "../modules/users";
|
||||
import UserForm from "../components/UserForm";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { withRouter } from "react-router-dom";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { History } from "history";
|
||||
import { User } from "@scm-manager/ui-types";
|
||||
import { Level, DeleteButton, confirmAlert, ErrorNotification } from "@scm-manager/ui-components";
|
||||
import { confirmAlert, DeleteButton, ErrorNotification, Level } from "@scm-manager/ui-components";
|
||||
import { deleteUser, getDeleteUserFailure, isDeleteUserPending } from "../modules/users";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { withRouter } from "react-router-dom";
|
||||
import UserForm from "../components/UserForm";
|
||||
import DeleteUser from "./DeleteUser";
|
||||
import { User } from "@scm-manager/ui-types";
|
||||
import { modifyUser, isModifyUserPending, getModifyUserFailure, modifyUserReset } from "../modules/users";
|
||||
import { getModifyUserFailure, isModifyUserPending, modifyUser, modifyUserReset } from "../modules/users";
|
||||
import { History } from "history";
|
||||
import { ErrorNotification } from "@scm-manager/ui-components";
|
||||
import { compose } from "redux";
|
||||
|
||||
@@ -4,10 +4,10 @@ import { Route } from "react-router-dom";
|
||||
import { History } from "history";
|
||||
import { ExtensionPoint } from "@scm-manager/ui-extensions";
|
||||
import { User } from "@scm-manager/ui-types";
|
||||
import { Page, Loading, Navigation, SubNavigation, Section, NavLink, ErrorPage } from "@scm-manager/ui-components";
|
||||
import { ErrorPage, Loading, Navigation, NavLink, Page, Section, SubNavigation } from "@scm-manager/ui-components";
|
||||
import { Details } from "./../components/table";
|
||||
import EditUser from "./EditUser";
|
||||
import { fetchUserByName, getUserByName, isFetchUserPending, getFetchUserFailure } from "../modules/users";
|
||||
import { fetchUserByName, getFetchUserFailure, getUserByName, isFetchUserPending } from "../modules/users";
|
||||
import { EditUserNavLink, SetPasswordNavLink, SetPermissionsNavLink } from "./../components/navLinks";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { getUsersLink } from "../../modules/indexResource";
|
||||
|
||||
@@ -3,24 +3,24 @@ import { connect } from "react-redux";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { RouteComponentProps } from "react-router-dom";
|
||||
import { History } from "history";
|
||||
import { User, PagedCollection } from "@scm-manager/ui-types";
|
||||
import { PagedCollection, User } from "@scm-manager/ui-types";
|
||||
import {
|
||||
CreateButton,
|
||||
LinkPaginator,
|
||||
Notification,
|
||||
OverviewPageActions,
|
||||
Page,
|
||||
PageActions,
|
||||
OverviewPageActions,
|
||||
Notification,
|
||||
LinkPaginator,
|
||||
urls,
|
||||
CreateButton
|
||||
urls
|
||||
} from "@scm-manager/ui-components";
|
||||
import { getUsersLink } from "../../modules/indexResource";
|
||||
import {
|
||||
fetchUsersByPage,
|
||||
getFetchUsersFailure,
|
||||
getUsersFromState,
|
||||
selectListAsCollection,
|
||||
isPermittedToCreateUsers,
|
||||
isFetchUsersPending,
|
||||
getFetchUsersFailure
|
||||
isPermittedToCreateUsers,
|
||||
selectListAsCollection
|
||||
} from "../modules/users";
|
||||
import { UserTable } from "./../components/table";
|
||||
|
||||
|
||||
@@ -3,49 +3,49 @@ import thunk from "redux-thunk";
|
||||
import fetchMock from "fetch-mock";
|
||||
|
||||
import reducer, {
|
||||
FETCH_USERS,
|
||||
FETCH_USERS_PENDING,
|
||||
FETCH_USERS_SUCCESS,
|
||||
FETCH_USERS_FAILURE,
|
||||
FETCH_USER,
|
||||
FETCH_USER_PENDING,
|
||||
FETCH_USER_SUCCESS,
|
||||
FETCH_USER_FAILURE,
|
||||
CREATE_USER,
|
||||
CREATE_USER_FAILURE,
|
||||
CREATE_USER_PENDING,
|
||||
CREATE_USER_SUCCESS,
|
||||
CREATE_USER_FAILURE,
|
||||
MODIFY_USER,
|
||||
MODIFY_USER_PENDING,
|
||||
MODIFY_USER_SUCCESS,
|
||||
MODIFY_USER_FAILURE,
|
||||
createUser,
|
||||
DELETE_USER,
|
||||
DELETE_USER_FAILURE,
|
||||
DELETE_USER_PENDING,
|
||||
DELETE_USER_SUCCESS,
|
||||
DELETE_USER_FAILURE,
|
||||
fetchUsers,
|
||||
getFetchUsersFailure,
|
||||
getUsersFromState,
|
||||
isFetchUsersPending,
|
||||
fetchUsersSuccess,
|
||||
deleteUser,
|
||||
deleteUserSuccess,
|
||||
FETCH_USER,
|
||||
FETCH_USER_FAILURE,
|
||||
FETCH_USER_PENDING,
|
||||
FETCH_USER_SUCCESS,
|
||||
FETCH_USERS,
|
||||
FETCH_USERS_FAILURE,
|
||||
FETCH_USERS_PENDING,
|
||||
FETCH_USERS_SUCCESS,
|
||||
fetchUserByLink,
|
||||
fetchUserByName,
|
||||
fetchUsers,
|
||||
fetchUsersSuccess,
|
||||
fetchUserSuccess,
|
||||
isFetchUserPending,
|
||||
getFetchUserFailure,
|
||||
createUser,
|
||||
isCreateUserPending,
|
||||
getCreateUserFailure,
|
||||
getUserByName,
|
||||
modifyUser,
|
||||
isModifyUserPending,
|
||||
getModifyUserFailure,
|
||||
deleteUser,
|
||||
isDeleteUserPending,
|
||||
deleteUserSuccess,
|
||||
getDeleteUserFailure,
|
||||
selectListAsCollection,
|
||||
isPermittedToCreateUsers
|
||||
getFetchUserFailure,
|
||||
getFetchUsersFailure,
|
||||
getModifyUserFailure,
|
||||
getUserByName,
|
||||
getUsersFromState,
|
||||
isCreateUserPending,
|
||||
isDeleteUserPending,
|
||||
isFetchUserPending,
|
||||
isFetchUsersPending,
|
||||
isModifyUserPending,
|
||||
isPermittedToCreateUsers,
|
||||
MODIFY_USER,
|
||||
MODIFY_USER_FAILURE,
|
||||
MODIFY_USER_PENDING,
|
||||
MODIFY_USER_SUCCESS,
|
||||
modifyUser,
|
||||
selectListAsCollection
|
||||
} from "./users";
|
||||
|
||||
const userZaphod = {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { isPending } from "../../modules/pending";
|
||||
import { getFailure } from "../../modules/failure";
|
||||
import * as types from "../../modules/types";
|
||||
import { combineReducers, Dispatch } from "redux";
|
||||
import { User, Action, PagedCollection } from "@scm-manager/ui-types";
|
||||
import { Action, PagedCollection, User } from "@scm-manager/ui-types";
|
||||
|
||||
export const FETCH_USERS = "scm/users/FETCH_USERS";
|
||||
export const FETCH_USERS_PENDING = `${FETCH_USERS}_${types.PENDING_SUFFIX}`;
|
||||
|
||||
Reference in New Issue
Block a user