Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The list of contributors in alphabetical order:
- [Alastair Lyall](https://orcid.org/0009-0000-4955-8935)
- [Alp Tuna](https://orcid.org/0009-0001-1915-3993)
- [Audrius Mecionis](https://orcid.org/0000-0002-3759-1663)
- [Cameron McClymont](https://orcid.org/0009-0002-0176-5251)
- [Daan Rosendal](https://orcid.org/0000-0002-3447-9000)
- [Diego Rodriguez](https://orcid.org/0000-0003-0649-2002)
- [Dinos Kousidis](https://orcid.org/0000-0002-4914-4289)
Expand Down
12 changes: 10 additions & 2 deletions reana-ui/src/pages/workflowList/WorkflowList.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@ import {
loadingWorkflows,
userHasWorkflows,
getWorkflowRefresh,
getUsersSharedWithYou,
} from "~/selectors";
import { NON_DELETED_STATUSES } from "~/config";
import { Title } from "~/components";
import { Pagination, Search } from "~/components";
import { Pagination, Search, Title } from "~/components";
import { applyFilter } from "~/components/Search";
import BasePage from "../BasePage";
import Welcome from "./components/Welcome";
import WorkflowFilters from "./components/WorkflowFilters";
import WorkflowList from "./components/WorkflowList";

import styles from "./WorkflowList.module.scss";
import _ from "lodash";

const PAGE_SIZE = 5;

Expand Down Expand Up @@ -63,6 +64,7 @@ function Workflows() {
const loading = useSelector(loadingWorkflows);
const reanaToken = useSelector(getReanaToken);
const configLoaded = useSelector(isConfigLoaded);
const usersSharedWithYou = useSelector(getUsersSharedWithYou, _.isEqual);
const interval = useRef(null);
const hideWelcomePage = !workflows || !configLoaded;
const { pollingSecs } = config;
Expand All @@ -75,10 +77,15 @@ function Workflows() {
useEffect(() => {
let shared = false;
let sharedBy = null;

if (ownedByFilter === "anybody") {
shared = true;
sharedBy = null;
} else if (ownedByFilter === "others") {
shared = true;
sharedBy = `${usersSharedWithYou.map((user) => user.email)}`;
} else if (ownedByFilter !== "you") {
// Owned by specific user
sharedBy = ownedByFilter;
}

Expand Down Expand Up @@ -125,6 +132,7 @@ function Workflows() {
sharedWithFilter,
sortDir,
workflowRefresh,
usersSharedWithYou,
]);

const cleanPolling = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export default function WorkflowSharingFilters({
() => [
{ key: "you", text: "you", value: "you" },
{ key: "anybody", text: "anybody", value: "anybody" },
{ key: "others", text: "others", value: "others" },
...usersSharedWithYou.map((user, index) => ({
key: index,
text: user.email,
Expand All @@ -53,6 +54,7 @@ export default function WorkflowSharingFilters({
const usersYouSharedWithOptions = useMemo(
() => [
{ key: "anybody", text: "anybody", value: "anybody" },
{ key: "nobody", text: "nobody", value: "nobody" },
...usersYouSharedWith.map((user, index) => ({
key: index,
text: user.email,
Expand Down