Skip to content

Commit

Permalink
#352: fixed API call issue for publications
Browse files Browse the repository at this point in the history
  • Loading branch information
yaxue1123 committed Oct 29, 2024
1 parent 2655d1e commit 384066f
Show file tree
Hide file tree
Showing 29 changed files with 19,853 additions and 12,654 deletions.
32,250 changes: 19,725 additions & 12,525 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 13 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
"@testing-library/react": "^12.1.3",
"@testing-library/user-event": "^7.2.1",
"axios": "^1.7.4",
"bootstrap": "^5.0.0",
"bootstrap": "^5.3.3",
"buffer": "^6.0.3",
"create-react-app": "^5.0.1",
"csv": "^6.2.8",
"cytoscape": "^3.19.0",
"cytoscape-compound-drag-and-drop": "^1.0.0",
"cytoscape-cose-bilkent": "^4.1.0",
"cytoscape-fcose": "^2.1.0",
"d3-color": "^3.1.0",
"file-saver": "^2.0.5",
"font-awesome": "^4.7.0",
"html-react-parser": "^1.2.4",
Expand All @@ -31,17 +33,19 @@
"moment": "^2.29.4",
"moment-range": "^4.0.2",
"multiselect-react-dropdown": "^2.0.25",
"nth-check": "^2.1.1",
"popper.js": "^1.16.1",
"postcss": "^8.4.47",
"prop-types": "^15.7.2",
"react": "^16.14.0",
"react": "^18.3.1",
"react-animated-number": "^0.4.4",
"react-bootstrap": "^1.5.0",
"react-bootstrap": "^2.10.5",
"react-cookie-consent": "^6.2.1",
"react-copy-to-clipboard": "^5.0.4",
"react-cytoscapejs": "^1.2.1",
"react-daterange-picker": "^2.0.1",
"react-datetime-picker": "^3.5.0",
"react-dom": "^16.14.0",
"react-dom": "^18.3.1",
"react-dropzone": "^14.2.3",
"react-helmet": "^6.1.0",
"react-hubspot-form": "^1.3.7",
Expand All @@ -54,14 +58,15 @@
"react-tag-input-component-2": "^2.3.0",
"react-toastify": "^6.2.0",
"reactstrap": "^8.6.0",
"sass": "^1.32.13",
"sass": "^1.80.4",
"scss": "^0.2.4",
"stream": "0.0.2",
"styled-components": "^5.3.1",
"util": "^0.12.5",
"uuid": "^8.3.2"
},
"scripts": {
"start": "react-scripts start",
"start": "GENERATE_SOURCEMAP=false && react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
Expand All @@ -83,6 +88,7 @@
]
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11"
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"ajv": "^7.2.4"
}
}
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import "./styles/App.scss";
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import { getWhoAmI } from "./services/peopleService.js";
import { getCurrentUser } from "./services/peopleService.js";
Expand Down Expand Up @@ -43,7 +44,6 @@ import Footer from "./components/Footer";
import SessionTimeoutModal from "./components/Modals/SessionTimeoutModal";
import { toast, ToastContainer } from "react-toastify";
import ProtectedRoutes from "./components/common/ProtectedRoutes";
import "./styles/App.scss";
import moment from 'moment';

class App extends React.Component {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Experiment/Slices.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Slices extends React.Component {
sortColumn: { path: "name", order: "asc" },
showSpinner: false,
spinnerText: "",
showAllSlices: false
// showAllSlices: false
};

async componentDidMount() {
Expand Down Expand Up @@ -159,7 +159,7 @@ class Slices extends React.Component {

render() {
const { hasProject, slices, pageSize, currentPage, sortColumn, searchQuery,
filterQuery, showSpinner, spinnerText, includeDeadSlices, showAllSlices } = this.state;
filterQuery, showSpinner, spinnerText, includeDeadSlices } = this.state;
const { totalCount, data } = this.getPageData();

return (
Expand Down
149 changes: 77 additions & 72 deletions src/components/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React from "react";
import { Link } from "react-router-dom";
import Container from 'react-bootstrap/Container';
import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col';
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faTwitter } from '@fortawesome/free-brands-svg-icons';
import { faGithub } from '@fortawesome/free-brands-svg-icons';
Expand All @@ -11,87 +14,89 @@ import trustedciBadge from "../imgs/trustedci.png";

class Footer extends React.Component {
render() {
return (<div className="app-footer bg-light">
<div className="row py-4">
<div className="col-sm-12 col-md-3">
<ul>
<li><b>Useful Links</b></li>
<li>
<Link to="/aup">Acceptable Use Policy</Link>
</li>
<li><Link to="/cookie-policy">Cookie Policy</Link></li>
{/* <li><Link to="/privacy-policy">Privacy Policy</Link></li> */}
<li><Link to="/branding">Branding Resources</Link></li>
</ul>
</div>
<div className="col-sm-12 col-md-3">
<ul>
<li><b>Help &amp; Support</b></li>
<li><a href={portalData.knowledgeBaseLink} target="_blank" rel="noopener noreferrer">Knowledge Base</a></li>
<li><a href={portalData.learnArticles.faq} target="_blank" rel="noopener noreferrer">FAQ</a></li>
<li>
<Link to="/help">Contact Us</Link>
</li>
<li>
<a href={portalData.learnArticles.portalReleaseNotes} target="_blank" rel="noopener noreferrer">
<i>{`Portal Version: v${portalData.version}`}</i>
</a>
</li>
</ul>
</div>
<div className="col-sm-12 col-md-4">
<div>
return (
<Container bsclass="app-footer bg-light">
<Row bsclass="py-4">
<Col sm={12} md={3}>
<ul>
<li><b>Social</b></li>
<li><b>Useful Links</b></li>
<li>
<div className="d-flex flex-row justify-content-between w-75 footer-social-icons">
<a href={portalData.fabricSocialLinks.twitter} target="_blank" rel="noopener noreferrer">
<FontAwesomeIcon icon={faTwitter} />
</a>
<a href={portalData.fabricSocialLinks.github} target="_blank" rel="noopener noreferrer">
<FontAwesomeIcon icon={faGithub} />
</a>
<a href={portalData.fabricSocialLinks.youtube} target="_blank" rel="noopener noreferrer">
<FontAwesomeIcon icon={faYoutube} />
</a>
<a href="mailto:[email protected]">
<FontAwesomeIcon icon={faEnvelope} />
</a>
</div>
<Link to="/aup">Acceptable Use Policy</Link>
</li>
<li><Link to="/cookie-policy">Cookie Policy</Link></li>
{/* <li><Link to="/privacy-policy">Privacy Policy</Link></li> */}
<li><Link to="/branding">Branding Resources</Link></li>
</ul>
</div>
</div>
<div className="col-sm-12 col-md-2">
<img
src={trustedciBadge}
width="175"
height="175"
className="d-inline-block align-top mr-2"
alt=""
/>
</div>
</div>
<div className="row">
<div className="col-sm-12 col-md-3">
<ul>
<li><u><b>© FABRIC {new Date().getFullYear()}</b></u></li>
</Col>
<Col sm={12} md={3}>
<ul>
<li><b>Help &amp; Support</b></li>
<li><a href={portalData.knowledgeBaseLink} target="_blank" rel="noopener noreferrer">Knowledge Base</a></li>
<li><a href={portalData.learnArticles.faq} target="_blank" rel="noopener noreferrer">FAQ</a></li>
<li>
<Link to="/help">Contact Us</Link>
</li>
<li>
<a href={portalData.learnArticles.portalReleaseNotes} target="_blank" rel="noopener noreferrer">
<i>{`Portal Version: v${portalData.version}`}</i>
</a>
</li>
</ul>
</div>
<div className="col-sm-12 col-md-9 d-flex flex-column align-items-center">
<div className="d-flex align-items-center mb-4">
</Col>
<Col sm={12} md={3}>
<div>
<ul>
<li><b>Social</b></li>
<li>
<div className="d-flex flex-row justify-content-between w-75 footer-social-icons">
<a href={portalData.fabricSocialLinks.twitter} target="_blank" rel="noopener noreferrer">
<FontAwesomeIcon icon={faTwitter} />
</a>
<a href={portalData.fabricSocialLinks.github} target="_blank" rel="noopener noreferrer">
<FontAwesomeIcon icon={faGithub} />
</a>
<a href={portalData.fabricSocialLinks.youtube} target="_blank" rel="noopener noreferrer">
<FontAwesomeIcon icon={faYoutube} />
</a>
<a href="mailto:[email protected]">
<FontAwesomeIcon icon={faEnvelope} />
</a>
</div>
</li>
</ul>
</div>
</Col>
<Col sm={12} md={3}>
<img
src={nsfLogo}
width="45"
height="45"
src={trustedciBadge}
width="175"
height="175"
className="d-inline-block align-top mr-2"
alt=""
/>
<u className="text-sm-size">FABRIC is funded by NSF grants CNS-1935966, CNS-2029176, CNS-2029200, CNS-2029235, CNS-2029260, CNS-2029261 and CNS-2330891.</u>
</div>
</div>
</div>
</div>)
</Col>
</Row>
<Row>
<Col sm={12} md={3}>
<ul>
<li><u><b>© FABRIC {new Date().getFullYear()}</b></u></li>
</ul>
</Col>
<Col sm={12} md={9} bsclass="d-flex flex-column align-items-center">
<div className="d-flex align-items-center mb-4">
<img
src={nsfLogo}
width="45"
height="45"
className="d-inline-block align-top mr-2"
alt=""
/>
<u className="text-sm-size">FABRIC is funded by NSF grants CNS-1935966, CNS-2029176, CNS-2029200, CNS-2029235, CNS-2029260, CNS-2029261 and CNS-2330891.</u>
</div>
</Col>
</Row>
</Container>
)
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/ProfileModal.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { NameInitialsAvatar } from 'react-name-initials-avatar';
import {NameInitialsAvatar} from 'react-name-initials-avatar';
import clearLocalStorage from "../utils/clearLocalStorage";
import { NavLink } from "react-router-dom";

Expand Down
3 changes: 2 additions & 1 deletion src/components/Project/Community/ProjectTopics.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const ProjectTopics = (topics, onTopicsUpdate) => {
<h1>Project Topics</h1>
<TagsInput
value={selected}
onChange={setSelected.then(selected => onTopicsUpdate(selected))}
// onChange={setSelected(selected, () => onTopicsUpdate(selected))}
onChange={setSelected}
name="topics"
placeHolder="enter topics"
/>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Project/ProjectProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class ProjectProfile extends Component {
<Table
columns={projectPersonnelColumns}
data={project.project_owners}
style={"table-sm"}
tStyle={"table-sm"}
/>
}
</div>
Expand All @@ -129,7 +129,7 @@ class ProjectProfile extends Component {
<Table
columns={projectPersonnelColumns}
data={project.project_members}
style={"table-sm"}
tStyle={"table-sm"}
/>
}
</div>
Expand Down
1 change: 0 additions & 1 deletion src/components/Project/ProjectTags.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from "react";
import SelectGroup from "../common/SelectGroup";
import _ from "lodash";

class ProjectTags extends React.Component {
handleTagAdd = (newTag) => {
Expand Down
3 changes: 1 addition & 2 deletions src/components/Project/ProjectsTable.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { Component } from "react";
import { Link } from "react-router-dom";
import Table from "../common/Table";
import _ from "lodash";
import shortenStr from "../../utils/shortenStr";

class ProjectsTable extends Component {
Expand Down Expand Up @@ -105,7 +104,7 @@ class ProjectsTable extends Component {
<Table
columns={isPublic ? this.columns["public"] : this.columns["private"]}
data={projects}
style={"table-md"}
tStyle={"table-md"}
/>
);
}
Expand Down
10 changes: 4 additions & 6 deletions src/components/Project/Public/PublicProjectsList.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import Alert from 'react-bootstrap/Alert';
import SpinnerWithText from "../../common/SpinnerWithText.jsx";
import Pagination from "../../common/Pagination.jsx";
import ProjectsTable from "../ProjectsTable.jsx";
Expand Down Expand Up @@ -178,12 +179,9 @@ class PublicProjectsList extends React.Component {
</a>
</div>
</div>
<div
className="alert alert-primary mb-2 d-flex flex-row justify-content-between align-items-center"
role="alert"
>
This is the public project list. Please log in to get access to project/ slice/ token/ SSH keys management features.
</div>
<Alert show={true} variant="primary">
This is the public project list. Please log in to get access to project/ slice/ token/ SSH keys management features.
</Alert>
<div className="w-100 input-group mt-3">
<div className="input-group mb-3 project-search-toolbar">
<div className="input-group-prepend">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Project/UsersTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class UsersTable extends Component {
<Table
columns={this.columns}
data={users}
style={"table-md"}
tStyle={"table-md"}
/>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Resource/DetailTable.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React from 'react';
import ProgressBar from '../common/ProgressBar';
import { sitesNameMapping } from "../../data/sites";
import { Link } from "react-router-dom";
Expand Down
2 changes: 1 addition & 1 deletion src/components/Resource/SiteDetailTable.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React from 'react';
import ProgressBar from '../common/ProgressBar';

const generateProgressBar = (free, total, color, labelColor) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Resource/SummaryTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class SummaryTable extends Component {
data={resources}
sortColumn={sortColumn}
onSort={onSort}
style={"table-md"}
tStyle={"table-md"}
/>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Slice/SlicesTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class SlicesTable extends Component {
data={slices}
sortColumn={sortColumn}
onSort={onSort}
style={"table-md"}
tStyle={"table-md"}
/>
);
}
Expand Down
1 change: 0 additions & 1 deletion src/components/SliceViewer/ErrorMessageAccordion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const ErrorMessageAccordion = props => {
className="panel-title mb-0"
data-toggle="collapse"
data-target="#errorTableCollapse"
aria-expanded="true"
>
This slice is in <b>{state}</b> state due to the following errors.
</h6>
Expand Down
Loading

0 comments on commit 384066f

Please sign in to comment.