import LinkOutlined from '@material-ui/icons/LinkOutlined';
import RemoveRedEye from '@material-ui/icons/RemoveRedEye';
import Computer from '@material-ui/icons/Computer';
+import WrapText from '@material-ui/icons/WrapText';
+import TextIncrease from '@material-ui/icons/ZoomIn';
+import TextDecrease from '@material-ui/icons/ZoomOut';
+ import CropFreeSharp from '@material-ui/icons/CropFreeSharp';
+ import ExitToApp from '@material-ui/icons/ExitToApp';
+ import CheckCircleOutline from '@material-ui/icons/CheckCircleOutline';
+ import RemoveCircleOutline from '@material-ui/icons/RemoveCircleOutline';
+ import NotInterested from '@material-ui/icons/NotInterested';
// Import FontAwesome icons
import { library } from '@fortawesome/fontawesome-svg-core';
import { faPencilAlt, faSlash, faUsers, faEllipsisH } from '@fortawesome/free-solid-svg-icons';
- import { CropFreeSharp } from '@material-ui/icons';
library.add(
faPencilAlt,
faSlash,
export const CanWriteIcon: IconType = (props) => <Edit {...props} />;
export const CanManageIcon: IconType = (props) => <Computer {...props} />;
export const AddUserIcon: IconType = (props) => <PersonAdd {...props} />;
+export const WordWrapIcon: IconType = (props) => <WrapText {...props} />;
+export const TextIncreaseIcon: IconType = (props) => <TextIncrease {...props} />;
+export const TextDecreaseIcon: IconType = (props) => <TextDecrease {...props} />;
+ export const DeactivateUserIcon: IconType = (props) => <NotInterested {...props} />;
+ export const LoginAsIcon: IconType = (props) => <ExitToApp {...props} />;
+ export const ActiveIcon: IconType = (props) => <CheckCircleOutline {...props} />;
+ export const SetupIcon: IconType = (props) => <RemoveCircleOutline {...props} />;
+ export const InactiveIcon: IconType = (props) => <NotInterested {...props} />;
const publicFavoritesMatch = Routes.matchPublicFavoritesRoute(pathname);
const trashMatch = Routes.matchTrashRoute(pathname);
const processMatch = Routes.matchProcessRoute(pathname);
- const processLogMatch = Routes.matchProcessLogRoute(pathname);
const repositoryMatch = Routes.matchRepositoriesRoute(pathname);
const searchResultsMatch = Routes.matchSearchResultsRoute(pathname);
const sharedWithMeMatch = Routes.matchSharedWithMeRoute(pathname);
const apiClientAuthorizationsMatch = Routes.matchApiClientAuthorizationsRoute(pathname);
const myAccountMatch = Routes.matchMyAccountRoute(pathname);
const linkAccountMatch = Routes.matchLinkAccountRoute(pathname);
- const userMatch = Routes.matchUsersRoute(pathname);
+ const usersMatch = Routes.matchUsersRoute(pathname);
+ const userProfileMatch = Routes.matchUserProfileRoute(pathname);
const groupsMatch = Routes.matchGroupsRoute(pathname);
const groupDetailsMatch = Routes.matchGroupDetailsRoute(pathname);
const linksMatch = Routes.matchLinksRoute(pathname);
store.dispatch(WorkbenchActions.loadTrash());
} else if (processMatch) {
store.dispatch(WorkbenchActions.loadProcess(processMatch.params.id));
- } else if (processLogMatch) {
- store.dispatch(WorkbenchActions.loadProcessLog(processLogMatch.params.id));
} else if (rootMatch) {
store.dispatch(navigateToRootProject);
} else if (sharedWithMeMatch) {
} else if (apiClientAuthorizationsMatch) {
store.dispatch(WorkbenchActions.loadApiClientAuthorizations);
} else if (myAccountMatch) {
- store.dispatch(WorkbenchActions.loadMyAccount);
+ store.dispatch(WorkbenchActions.loadUserProfile());
} else if (linkAccountMatch) {
store.dispatch(WorkbenchActions.loadLinkAccount);
- } else if (userMatch) {
+ } else if (usersMatch) {
store.dispatch(WorkbenchActions.loadUsers);
+ } else if (userProfileMatch) {
+ store.dispatch(WorkbenchActions.loadUserProfile(userProfileMatch.params.id));
} else if (groupsMatch) {
store.dispatch(WorkbenchActions.loadGroupsPanel);
} else if (groupDetailsMatch) {
PROCESSES: `/processes/:id(${RESOURCE_UUID_PATTERN})`,
FAVORITES: '/favorites',
TRASH: '/trash',
- PROCESS_LOGS: `/process-logs/:id(${RESOURCE_UUID_PATTERN})`,
REPOSITORIES: '/repositories',
SHARED_WITH_ME: '/shared-with-me',
RUN_PROCESS: '/run-process',
LINK_ACCOUNT: '/link_account',
KEEP_SERVICES: `/keep-services`,
USERS: '/users',
+ USER_PROFILE: `/user/:id(${RESOURCE_UUID_PATTERN})`,
API_CLIENT_AUTHORIZATIONS: `/api_client_authorizations`,
GROUPS: '/groups',
GROUP_DETAILS: `/group/:id(${RESOURCE_UUID_PATTERN})`,
export const getProcessUrl = (uuid: string) => `/processes/${uuid}`;
-export const getProcessLogUrl = (uuid: string) => `/process-logs/${uuid}`;
-
export const getGroupUrl = (uuid: string) => `/group/${uuid}`;
+ export const getUserProfileUrl = (uuid: string) => `/user/${uuid}`;
+
export interface ResourceRouteParams {
id: string;
}
export const matchProcessRoute = (route: string) =>
matchPath<ResourceRouteParams>(route, { path: Routes.PROCESSES });
-export const matchProcessLogRoute = (route: string) =>
- matchPath<ResourceRouteParams>(route, { path: Routes.PROCESS_LOGS });
-
export const matchSharedWithMeRoute = (route: string) =>
matchPath(route, { path: Routes.SHARED_WITH_ME });
export const matchUsersRoute = (route: string) =>
matchPath(route, { path: Routes.USERS });
+ export const matchUserProfileRoute = (route: string) =>
+ matchPath<ResourceRouteParams>(route, { path: Routes.USER_PROFILE });
+
export const matchApiClientAuthorizationsRoute = (route: string) =>
matchPath(route, { path: Routes.API_CLIENT_AUTHORIZATIONS });
description: res.description,
outputUuid: res.outputUuid || '',
workflowUuid: res.properties.workflowUuid || '',
- menuKind: ContextMenuKind.PROCESS
+ menuKind: ContextMenuKind.PROCESS_RESOURCE
}));
}
};
}
};
+ export const openUserContextMenu = (event: React.MouseEvent<HTMLElement>, user: UserResource) =>
+ (dispatch: Dispatch, getState: () => RootState) => {
+ dispatch<any>(openContextMenu(event, {
+ name: '',
+ uuid: user.uuid,
+ ownerUuid: user.ownerUuid,
+ kind: user.kind,
+ menuKind: ContextMenuKind.USER
+ }));
+ };
+
export const resourceUuidToContextMenuKind = (uuid: string, readonly = false) =>
(dispatch: Dispatch, getState: () => RootState) => {
const { isAdmin: isAdminUser, uuid: userUuid } = getState().auth.user!;
import { push } from "react-router-redux";
import { ResourceKind, extractUuidKind } from 'models/resource';
import { SidePanelTreeCategory } from '../side-panel-tree/side-panel-tree-actions';
- import { Routes, getGroupUrl, getNavUrl } from 'routes/routes';
-import { Routes, getProcessLogUrl, getGroupUrl, getNavUrl, getUserProfileUrl } from 'routes/routes';
++import { Routes, getGroupUrl, getNavUrl, getUserProfileUrl } from 'routes/routes';
import { RootState } from 'store/store';
import { ServiceRepository } from 'services/services';
import { pluginConfig } from 'plugins';
import { snackbarActions, SnackbarKind } from 'store/snackbar/snackbar-actions';
+ import { USERS_PANEL_LABEL, MY_ACCOUNT_PANEL_LABEL } from 'store/breadcrumbs/breadcrumbs-actions';
const navigationNotAvailable = (id: string) =>
snackbarActions.OPEN_SNACKBAR({
case SidePanelTreeCategory.ALL_PROCESSES:
dispatch(navigateToAllProcesses);
return;
+ case USERS_PANEL_LABEL:
+ dispatch(navigateToUsers);
+ return;
+ case MY_ACCOUNT_PANEL_LABEL:
+ dispatch(navigateToMyAccount);
+ return;
}
dispatch(navigationNotAvailable(uuid));
};
-export const navigateToProcessLogs = compose(push, getProcessLogUrl);
-
export const navigateToRootProject = (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
navigateTo(SidePanelTreeCategory.PROJECTS)(dispatch, getState);
};
export const navigateToUsers = push(Routes.USERS);
+ export const navigateToUserProfile = compose(push, getUserProfileUrl);
+
export const navigateToApiClientAuthorizations = push(Routes.API_CLIENT_AUTHORIZATIONS);
export const navigateToGroups = push(Routes.GROUPS);
setProcessBreadcrumbs,
setSharedWithMeBreadcrumbs,
setSidePanelBreadcrumbs,
- setTrashBreadcrumbs
+ setTrashBreadcrumbs,
+ setUsersBreadcrumbs,
+ setMyAccountBreadcrumbs,
+ setUserProfileBreadcrumbs,
} from 'store/breadcrumbs/breadcrumbs-actions';
import { navigateTo, navigateToRootProject } from 'store/navigation/navigation-action';
import { MoveToFormDialogData } from 'store/move-to-dialog/move-to-dialog';
import * as processCopyActions from 'store/processes/process-copy-actions';
import { trashPanelColumns } from "views/trash-panel/trash-panel";
import { loadTrashPanel, trashPanelActions } from "store/trash-panel/trash-panel-action";
-import { initProcessLogsPanel } from 'store/process-logs-panel/process-logs-panel-actions';
import { loadProcessPanel } from 'store/process-panel/process-panel-actions';
import {
loadSharedWithMePanel,
import { CopyFormDialogData } from 'store/copy-dialog/copy-dialog';
import { loadWorkflowPanel, workflowPanelActions } from 'store/workflow-panel/workflow-panel-actions';
import { loadSshKeysPanel } from 'store/auth/auth-action-ssh';
- import { loadMyAccountPanel } from 'store/my-account/my-account-panel-actions';
import { loadLinkAccountPanel, linkAccountPanelActions } from 'store/link-account-panel/link-account-panel-actions';
import { loadSiteManagerPanel } from 'store/auth/auth-action-session';
import { workflowPanelColumns } from 'views/workflow-panel/workflow-panel-view';
import { loadRepositoriesPanel } from 'store/repositories/repositories-actions';
import { loadKeepServicesPanel } from 'store/keep-services/keep-services-actions';
import { loadUsersPanel, userBindedActions } from 'store/users/users-actions';
+ import * as userProfilePanelActions from 'store/user-profile/user-profile-actions';
import { linkPanelActions, loadLinkPanel } from 'store/link-panel/link-panel-actions';
import { linkPanelColumns } from 'views/link-panel/link-panel-root';
import { userPanelColumns } from 'views/user-panel/user-panel';
import { collectionPanelFilesAction } from '../collection-panel/collection-panel-files/collection-panel-files-actions';
import { createTree } from 'models/tree';
import { AdminMenuIcon } from 'components/icon/icon';
+ import { userProfileGroupsColumns } from 'views/user-profile-panel/user-profile-panel-root';
export const WORKBENCH_LOADING_SCREEN = 'workbenchLoadingScreen';
dispatch(groupPanelActions.GroupsPanelActions.SET_COLUMNS({ columns: groupsPanelColumns }));
dispatch(groupDetailsPanelActions.GroupMembersPanelActions.SET_COLUMNS({ columns: groupDetailsMembersPanelColumns }));
dispatch(groupDetailsPanelActions.GroupPermissionsPanelActions.SET_COLUMNS({ columns: groupDetailsPermissionsPanelColumns }));
+ dispatch(userProfilePanelActions.UserProfileGroupsActions.SET_COLUMNS({ columns: userProfileGroupsColumns }));
dispatch(linkPanelActions.SET_COLUMNS({ columns: linkPanelColumns }));
dispatch(apiClientAuthorizationsActions.SET_COLUMNS({ columns: apiClientAuthorizationPanelColumns }));
dispatch(collectionsContentAddressActions.SET_COLUMNS({ columns: collectionContentAddressPanelColumns }));
}
};
-export const loadProcessLog = (uuid: string) =>
- handleFirstTimeLoad(
- async (dispatch: Dispatch) => {
- const process = await dispatch<any>(processesActions.loadProcess(uuid));
- dispatch<any>(setProcessBreadcrumbs(uuid));
- dispatch<any>(initProcessLogsPanel(uuid));
- await dispatch<any>(activateSidePanelTreeItem(process.containerRequest.ownerUuid));
- });
-
export const resourceIsNotLoaded = (uuid: string) =>
snackbarActions.OPEN_SNACKBAR({
message: `Resource identified by ${uuid} is not loaded.`,
await dispatch(loadSiteManagerPanel());
});
- export const loadMyAccount = handleFirstTimeLoad(
- (dispatch: Dispatch<any>) => {
- dispatch(loadMyAccountPanel());
- });
+ export const loadUserProfile = (userUuid?: string) =>
+ handleFirstTimeLoad(
+ (dispatch: Dispatch<any>) => {
+ if (userUuid) {
+ dispatch(setUserProfileBreadcrumbs(userUuid));
+ dispatch(userProfilePanelActions.loadUserProfilePanel(userUuid));
+ } else {
+ dispatch(setMyAccountBreadcrumbs());
+ dispatch(userProfilePanelActions.loadUserProfilePanel());
+ }
+ }
+ );
export const loadLinkAccount = handleFirstTimeLoad(
(dispatch: Dispatch<any>) => {
export const loadUsers = handleFirstTimeLoad(
async (dispatch: Dispatch<any>) => {
await dispatch(loadUsersPanel());
- dispatch(setBreadcrumbs([{ label: 'Users' }]));
+ dispatch(setUsersBreadcrumbs());
});
export const loadApiClientAuthorizations = handleFirstTimeLoad(
import { Routes } from 'routes/routes';
import { SidePanel } from 'views-components/side-panel/side-panel';
import { ProcessPanel } from 'views/process-panel/process-panel';
-import { ProcessLogPanel } from 'views/process-log-panel/process-log-panel';
import { ChangeWorkflowDialog } from 'views-components/run-process-dialog/change-workflow-dialog';
import { CreateProjectDialog } from 'views-components/dialog-forms/create-project-dialog';
import { CreateCollectionDialog } from 'views-components/dialog-forms/create-collection-dialog';
import { SshKeyPanel } from 'views/ssh-key-panel/ssh-key-panel';
import { SshKeyAdminPanel } from 'views/ssh-key-panel/ssh-key-admin-panel';
import { SiteManagerPanel } from "views/site-manager-panel/site-manager-panel";
- import { MyAccountPanel } from 'views/my-account-panel/my-account-panel';
+ import { UserProfilePanel } from 'views/user-profile-panel/user-profile-panel';
import { SharingDialog } from 'views-components/sharing-dialog/sharing-dialog';
import { NotFoundDialog } from 'views-components/not-found-dialog/not-found-dialog';
import { AdvancedTabDialog } from 'views-components/advanced-tab-dialog/advanced-tab-dialog';
import { UserAttributesDialog } from 'views-components/user-dialog/attributes-dialog';
import { CreateUserDialog } from 'views-components/dialog-forms/create-user-dialog';
import { HelpApiClientAuthorizationDialog } from 'views-components/api-client-authorizations-dialog/help-dialog';
- import { UserManageDialog } from 'views-components/user-dialog/manage-dialog';
- import { SetupShellAccountDialog } from 'views-components/dialog-forms/setup-shell-account-dialog';
+ import { DeactivateDialog } from 'views-components/user-dialog/deactivate-dialog';
+ import { ActivateDialog } from 'views-components/user-dialog/activate-dialog';
+ import { SetupDialog } from 'views-components/user-dialog/setup-dialog';
import { GroupsPanel } from 'views/groups-panel/groups-panel';
import { RemoveGroupDialog } from 'views-components/groups-dialog/remove-dialog';
import { GroupAttributesDialog } from 'views-components/groups-dialog/attributes-dialog';
<Route path={Routes.ALL_PROCESSES} component={AllProcessesPanel} />
<Route path={Routes.PROCESSES} component={ProcessPanel} />
<Route path={Routes.TRASH} component={TrashPanel} />
- <Route path={Routes.PROCESS_LOGS} component={ProcessLogPanel} />
<Route path={Routes.SHARED_WITH_ME} component={SharedWithMePanel} />
<Route path={Routes.RUN_PROCESS} component={RunProcessPanel} />
<Route path={Routes.WORKFLOWS} component={WorkflowPanel} />
<Route path={Routes.KEEP_SERVICES} component={KeepServicePanel} />
<Route path={Routes.USERS} component={UserPanel} />
<Route path={Routes.API_CLIENT_AUTHORIZATIONS} component={ApiClientAuthorizationPanel} />
- <Route path={Routes.MY_ACCOUNT} component={MyAccountPanel} />
+ <Route path={Routes.MY_ACCOUNT} component={UserProfilePanel} />
+ <Route path={Routes.USER_PROFILE} component={UserProfilePanel} />
<Route path={Routes.GROUPS} component={GroupsPanel} />
<Route path={Routes.GROUP_DETAILS} component={GroupDetailsPanel} />
<Route path={Routes.LINKS} component={LinkPanel} />
<RepositoryAttributesDialog />
<RepositoriesSampleGitDialog />
<RichTextEditorDialog />
- <SetupShellAccountDialog />
<SharingDialog />
<NotFoundDialog />
<Snackbar />
<UpdateProcessDialog />
<UpdateProjectDialog />
<UserAttributesDialog />
- <UserManageDialog />
+ <DeactivateDialog />
+ <ActivateDialog />
+ <SetupDialog />
<VirtualMachineAttributesDialog />
<FedLogin />
<WebDavS3InfoDialog />