Skip to content

Commit

Permalink
Merge pull request #177 from bento-platform/remove-federation
Browse files Browse the repository at this point in the history
Remove peers/federation code
  • Loading branch information
davidlougheed authored Nov 15, 2022
2 parents 5ce1603 + e3d3c2f commit 177ef4f
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 615 deletions.
1 change: 1 addition & 0 deletions .idea/dictionaries/davidlougheed.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions src/components/AdminContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import OwnerRoute from "./OwnerRoute";
import SitePageHeader from "./SitePageHeader";
import ServiceContent from "./ServiceContent";
import DataManagerContent from "./DataManagerContent";
import PeersContent from "./PeersContent";
import ServiceDetail from "./services/ServiceDetail";

import {SITE_NAME} from "../constants";
Expand All @@ -32,7 +31,6 @@ class AdminContent extends Component {
<OwnerRoute path={withBasePath("admin/services")} component={ServiceContent} />
<OwnerRoute path={withBasePath("admin/services/:artifact")} component={ServiceDetail} />
<OwnerRoute path={withBasePath("admin/data/manager")} component={DataManagerContent} />
<OwnerRoute path={withBasePath("admin/peers")} component={PeersContent} />
<Redirect from={BASE_PATH} to={withBasePath("admin/services")} />
</Switch>
</Layout.Content>
Expand All @@ -47,9 +45,6 @@ AdminContent.propTypes = {

projects: PropTypes.arrayOf(projectPropTypesShape),
isFetchingProjects: PropTypes.bool,

peers: PropTypes.arrayOf(PropTypes.string),
isFetchingPeers: PropTypes.bool,
};

const mapStateToProps = state => ({
Expand All @@ -58,9 +53,6 @@ const mapStateToProps = state => ({

projects: state.projects.items,
isFetchingProjects: state.auth.isFetchingDependentData || state.projects.isFetching,

peers: state.peers.items,
isFetchingPeers: state.auth.isFetchingDependentData,
});

export default connect(mapStateToProps)(AdminContent);
8 changes: 1 addition & 7 deletions src/components/App.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {Component, Suspense, lazy} from "react";
import {connect} from "react-redux";
import {withRouter, Redirect, Route, Switch} from "react-router-dom";
import {withRouter, Redirect, Switch} from "react-router-dom";
import PropTypes from "prop-types";

import io from "socket.io-client";
Expand All @@ -14,7 +14,6 @@ import SiteFooter from "./SiteFooter";
import SitePageLoading from "./SitePageLoading";

import {fetchDependentDataWithProvidedUser, fetchUserAndDependentData, setUser} from "../modules/auth/actions";
import {fetchPeersOrError} from "../modules/peers/actions";

import eventHandler from "../events";
import {nop} from "../utils/misc";
Expand All @@ -29,7 +28,6 @@ const NotificationDrawer = lazy(() => import("./notifications/NotificationDrawer

// Lazy-load route components
const OverviewContent = lazy(() => import("./OverviewContent"));
const DataDiscoveryContent = lazy(() => import("./DataDiscoveryContent"));
const DataExplorerContent = lazy(() => import("./DataExplorerContent"));
const AdminContent = lazy(() => import("./AdminContent"));
const NotificationsContent = lazy(() => import("./notifications/NotificationsContent"));
Expand Down Expand Up @@ -111,7 +109,6 @@ class App extends Component {
<Suspense fallback={<SitePageLoading />}>
<Switch>
<OwnerRoute path={withBasePath("overview")} component={OverviewContent} />
<Route path={withBasePath("data/sets")} component={DataDiscoveryContent} />
<OwnerRoute path={withBasePath("data/explorer")} component={DataExplorerContent} />
<OwnerRoute path={withBasePath("admin")} component={AdminContent} />
<OwnerRoute path={withBasePath("notifications")} component={NotificationsContent} />
Expand Down Expand Up @@ -166,7 +163,6 @@ class App extends Component {
componentDidMount() {
(async () => {
await this.props.fetchUserAndDependentData(async () => {
await this.props.fetchPeersOrError();
this.createEventRelayConnectionIfNecessary();
});

Expand All @@ -190,7 +186,6 @@ App.propTypes = {
user: userPropTypesShape,

fetchUserAndDependentData: PropTypes.func,
fetchPeersOrError: PropTypes.func,
fetchDependentDataWithProvidedUser: PropTypes.func,
};

Expand All @@ -204,5 +199,4 @@ const mapStateToProps = state => ({
export default withRouter(connect(mapStateToProps, {
fetchDependentDataWithProvidedUser,
fetchUserAndDependentData,
fetchPeersOrError,
})(App));
41 changes: 0 additions & 41 deletions src/components/DataDiscoveryContent.js

This file was deleted.

71 changes: 0 additions & 71 deletions src/components/PeersContent.js

This file was deleted.

6 changes: 0 additions & 6 deletions src/components/SiteHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ const SiteHeader = () => {
text: <span className="nav-text">Overview</span>,
key: "overview",
},
{
url: withBasePath("data/sets"),
icon: <Icon type="file-search" />,
text: <span className="nav-text">Datasets</span>,
key: "datasets",
},
{
url: withBasePath("data/explorer"),
icon: <Icon type="bar-chart" />,
Expand Down
7 changes: 3 additions & 4 deletions src/components/datasets/Dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ class Dataset extends Component {
<Typography.Paragraph style={{maxWidth: "600px"}}>
Linked Field Sets group common fields (i.e. fields that share the same &ldquo;value
space&rdquo;) between multiple data types. For example, these sets can be used to tell the
discovery system that Phenopacket biosample identifiers are the same as variant call sample
identifiers, and so variant calls with an identifier of &ldquo;sample1&rdquo; come from a
data exploration system that Phenopacket biosample identifiers are the same as variant call
sample identifiers, and so variant calls with an identifier of &ldquo;sample1&rdquo; come from a
biosample with identifier &ldquo;sample1&rdquo;.
</Typography.Paragraph>
<Typography.Paragraph style={{maxWidth: "600px"}}>
Expand Down Expand Up @@ -183,8 +183,7 @@ class Dataset extends Component {
content: <>
<Typography.Paragraph>
All data contained in the dataset will be deleted permanently, and the
dataset will no longer be available for discovery within the CHORD
federation.
dataset will no longer be available for exploration.
{/* TODO: Real terms and conditions */}
</Typography.Paragraph>
</>,
Expand Down
57 changes: 0 additions & 57 deletions src/components/discovery/DiscoveryDatasetContent.js

This file was deleted.

Loading

0 comments on commit 177ef4f

Please sign in to comment.