Author: {author}
@@ -195,13 +179,13 @@ class LookupResultsForm extends Component{
else if(type == 'blob'){
return (
-
- Lookup Results for Blob {sha}
-
-
-
-
-
+
+ Lookup Results for Blob {sha}
+
+
+
+
+
)
}
}
diff --git a/client/app/components/Lookup/LookupResultsPage.js b/client/app/components/Lookup/LookupResultsPage.js
index 04a50cc..7689ebb 100644
--- a/client/app/components/Lookup/LookupResultsPage.js
+++ b/client/app/components/Lookup/LookupResultsPage.js
@@ -1,10 +1,7 @@
-import LookupSearchForm from './LookupSearchForm';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import LookupResultsForm from './LookupResultsForm';
-import { Row, Col, Container, Card } from 'reactstrap';
import { connect } from 'react-redux';
-import { withRouter } from 'react-router-dom';
import { lookupSha } from '../../../actions/Search';
class LookupResultsPage extends Component {
diff --git a/client/app/components/Lookup/LookupSearchForm.js b/client/app/components/Lookup/LookupSearchForm.js
index 5b293ff..ca72671 100644
--- a/client/app/components/Lookup/LookupSearchForm.js
+++ b/client/app/components/Lookup/LookupSearchForm.js
@@ -1,9 +1,7 @@
import React, { Component } from 'react';
-// import { FilterableContent } from 'react-filterable-content';
import { withRouter } from "react-router-dom";
import { connect } from 'react-redux';
import TextFieldGroup from '../common/TextFieldGroup';
-import Markdown from 'react-markdown';
import {
FormControl,
InputLabel,
@@ -18,16 +16,16 @@ import {
FormGroup
} from "reactstrap";
-class LookupSearchForm extends React.Component {
+class LookupSearchForm extends Component {
constructor(props){
super(props);
- this.state = {
+ this.state = {
sha: '',
type: '',
isLoading: false,
- badInput: false,
- tutorial: false,
- noType: false
+ badInput: false,
+ tutorial: false,
+ noType: false
}
this.onChange = this.onChange.bind(this);
this.onSubmit = this.onSubmit.bind(this);
diff --git a/client/app/components/Lookup/LookupSearchPage.js b/client/app/components/Lookup/LookupSearchPage.js
index 1b5008f..3e44465 100644
--- a/client/app/components/Lookup/LookupSearchPage.js
+++ b/client/app/components/Lookup/LookupSearchPage.js
@@ -1,7 +1,6 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
-import { withRouter } from "react-router-dom";
import LookupSearchForm from './LookupSearchForm';
import { lookupSha } from '../../../actions/Search';
diff --git a/client/app/components/Mapping/CommitMap.js b/client/app/components/Mapping/CommitMap.js
index 63d6938..3feabcd 100644
--- a/client/app/components/Mapping/CommitMap.js
+++ b/client/app/components/Mapping/CommitMap.js
@@ -22,8 +22,9 @@ function select_map(props) {
else if(type === 'c2b') return c2b(data, buttonClicked);
else if(type === 'c2cc' || type === "c2pc" || type === "c2h") return c2c(data,type, buttonClicked);
else if(type === 'c2f') return c2f(data, buttonClicked);
- else if(type === 'c2ta') return c2ta(data, buttonClicked);
+ //else if(type === 'c2ta') return c2ta(data, buttonClicked);
else if(type === 'c2td') return c2td(data, buttonClicked);
+ else if(type === 'c2dat') return c2dat(data, buttonClicked);
}
function c2project(data,type,buttonClicked) {
@@ -155,6 +156,7 @@ function c2c(data, type, buttonClicked) {
}
+/*
function c2ta(data, buttonClicked) {
return (
@@ -167,6 +169,7 @@ function c2ta(data, buttonClicked) {
);
}
+*/
function c2td(data) {
return (
@@ -176,6 +179,31 @@ function c2td(data) {
);
}
+function c2dat(data, buttonClicked) {
+ console.log('In c2dat');
+ let c_time = data[0];
+ let tz = data[1];
+ let author = data[2];
+ let tree = data[3];
+ for(let i = 0; i < 4; i++) data.shift();
+ console.log(data);
+ return (
+
+ Commit Time: {c_time}
+ Timezone: {tz}
+ Author: {author}
+ {!buttonClicked && }
+
+ Tree: {tree}
+ { data.map((parent) =>
+ Parent: {parent}
+ {!buttonClicked && }
+
+ )}
+
+ );
+}
+
export function CommitMap(props) {
console.log("CommitMap");
return(
diff --git a/client/app/components/Mapping/MapButton.js b/client/app/components/Mapping/MapButton.js
index d08ce0c..ffd8177 100644
--- a/client/app/components/Mapping/MapButton.js
+++ b/client/app/components/Mapping/MapButton.js
@@ -1,7 +1,4 @@
-import PropTypes from 'prop-types';
-import React, { useEffect, useState, Component } from 'react';
-import ReactDOM from 'react-dom';
-import { withRouter, Router } from "react-router-dom";
+import React, { Component } from 'react';
import { connect } from 'react-redux';
import { options } from './options';
import { CommitMap } from './CommitMap';
@@ -12,42 +9,34 @@ import { ProjectMap } from './ProjectMap';
import { lookupSha } from '../../../actions/Search';
import '../common/modal.css';
// import queryString from 'query-string';
-import Markdown from 'react-markdown';
import {
Button as MenuButton,
- FormControl,
Menu,
- MenuItem,
- InputLabel,
- Select
+ MenuItem
} from '@material-ui/core';
import {
Modal,
- ModalHeader,
ModalBody,
} from "reactstrap";
class MapButton extends Component{
constructor(props){
super(props);
-
- this.state = {
- query: '',
- data: [],
- from: '',
- type: '',
- showMap: false,
- Anchor: null,
- isLoaded: false,
- }
-
- this.onClick = this.onClick.bind(this);
- this.toggleMap = this.toggleMap.bind(this);
- this.handleClick = this.handleClick.bind(this);
- this.handleClose = this.handleClose.bind(this);
-
- }
+ this.state = {
+ query: '',
+ data: [],
+ from: '',
+ type: '',
+ showMap: false,
+ Anchor: null,
+ isLoaded: false,
+ }
+ this.onClick = this.onClick.bind(this);
+ this.toggleMap = this.toggleMap.bind(this);
+ this.handleClick = this.handleClick.bind(this);
+ this.handleClose = this.handleClose.bind(this);
+ }
componentDidMount() {
this.setState({
@@ -63,18 +52,18 @@ class MapButton extends Component{
});
}
- onClick(e,type){
- e.preventDefault();
- this.Search(type);
- }
+ onClick(e, type) {
+ e.preventDefault();
+ this.Search(type);
+ }
- handleClick(e){
- this.setState({ Anchor: e.currentTarget });
- }
+ handleClick(e) {
+ this.setState({ Anchor: e.currentTarget });
+ }
- handleClose(e){
- this.setState({ Anchor: null })
- }
+ handleClose(e) {
+ this.setState({ Anchor: null })
+ }
showItems(){
return (
@@ -95,21 +84,21 @@ class MapButton extends Component{
);
}
- Search(type) {
- this.props.lookupSha(this.state.query, type, "getValues")
- .then( (response) => {
- let result = response.data.stdout;
- let stderr = response.data.stderr;
- let data = [];
- data = result.split(/;|\r|\n/);
- this.setState({
- data: data,
- type: type,
- showMap: !this.state.showMap,
- Anchor: null
- });
- });
- }
+ Search(type) {
+ this.props.lookupSha(this.state.query, type, "getValues")
+ .then((response) => {
+ let result = response.data.stdout;
+ let stderr = response.data.stderr;
+ let data = [];
+ data = result.split(/;|\r|\n/);
+ this.setState({
+ data: data,
+ type: type,
+ showMap: !this.state.showMap,
+ Anchor: null
+ });
+ });
+ }
renderButton() {
let from = this.state.from;
@@ -139,19 +128,19 @@ class MapButton extends Component{
render() {
- return (
- <>
- {this.state.isLoaded && this.renderButton()}
- {this.state.Anchor && this.showItems()}
- {this.state.data &&
-
- {this.renderModal()}
-
- }
- >
- );
- }
+ return (
+ <>
+ {this.state.isLoaded && this.renderButton()}
+ {this.state.Anchor && this.showItems()}
+ {this.state.data &&
+
+ {this.renderModal()}
+
+ }
+ >
+ );
+ }
}
diff --git a/client/app/components/Mapping/MapResultsForm.js b/client/app/components/Mapping/MapResultsForm.js
index 7c6e120..45be6a3 100644
--- a/client/app/components/Mapping/MapResultsForm.js
+++ b/client/app/components/Mapping/MapResultsForm.js
@@ -1,7 +1,5 @@
-import PropTypes from 'prop-types';
-import React, { useEffect, useState, Component } from 'react';
-import ReactDOM from 'react-dom';
-import { withRouter, Router } from "react-router-dom";
+import React, { Component } from 'react';
+import { withRouter } from "react-router-dom";
import { connect } from 'react-redux';
import { BlobMap } from './BlobMap';
import { CommitMap } from './CommitMap';
diff --git a/client/app/components/Mapping/MapResultsPage.js b/client/app/components/Mapping/MapResultsPage.js
index 77aea72..af35a74 100644
--- a/client/app/components/Mapping/MapResultsPage.js
+++ b/client/app/components/Mapping/MapResultsPage.js
@@ -2,7 +2,6 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import MapResultsForm from './MapResultsForm';
import { connect } from 'react-redux';
-import { withRouter } from 'react-router-dom';
import { lookupSha } from '../../../actions/Search';
class MapResultsPage extends Component {
diff --git a/client/app/components/Mapping/MappingForm.js b/client/app/components/Mapping/MappingForm.js
index 9c385c0..cf65f29 100644
--- a/client/app/components/Mapping/MappingForm.js
+++ b/client/app/components/Mapping/MappingForm.js
@@ -1,5 +1,4 @@
import React, { Component } from 'react';
-// import { FilterableContent } from 'react-filterable-content';
import { withRouter } from "react-router-dom";
import { connect } from 'react-redux';
import TextFieldGroup from '../common/TextFieldGroup';
diff --git a/client/app/components/Mapping/MappingPage.js b/client/app/components/Mapping/MappingPage.js
index 11dc393..b8ccda4 100644
--- a/client/app/components/Mapping/MappingPage.js
+++ b/client/app/components/Mapping/MappingPage.js
@@ -1,7 +1,6 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
-import { withRouter } from "react-router-dom";
import MappingForm from './MappingForm';
import { lookupSha } from '../../../actions/Search';
diff --git a/client/app/components/Mapping/ProjectMap.js b/client/app/components/Mapping/ProjectMap.js
index ad399a8..03c821a 100644
--- a/client/app/components/Mapping/ProjectMap.js
+++ b/client/app/components/Mapping/ProjectMap.js
@@ -10,12 +10,12 @@ import {
Table,
} from "reactstrap";
-function select_map(props){
+function select_map(props) {
let type = props.state.type;
let data = props.state.data;
- let buttonClicked = (props.state.buttonClicked) ? true : false;
+ let buttonClicked = (props.state.buttonClicked) ? true : false;
- if(data[data.length - 1] === "") data.pop();
+ if (data[data.length - 1] === "") data.pop();
if (type === "p2a") return p2a(data, buttonClicked);
else if (type === "p2c" || type === "P2c") return p2c(data, buttonClicked);
@@ -32,12 +32,12 @@ function p2a(data, buttonClicked){
return (
-
- );
+
+ );
}
@@ -52,11 +52,11 @@ function p2c(data, buttonClicked){
data.shift();
const commits = data.map((commit) =>
-
- Commit: |
- {commit} |
- {!buttonClicked && | }
-
);
+
+ Commit: |
+ {commit} |
+ {!buttonClicked && | }
+
);
return (
diff --git a/client/app/components/Mapping/options.js b/client/app/components/Mapping/options.js
index 28a6882..5a86c11 100644
--- a/client/app/components/Mapping/options.js
+++ b/client/app/components/Mapping/options.js
@@ -1,13 +1,13 @@
let options = {
"commit": {"blob": "b", "project": "p", "root project": "P",
"child commit": "cc", "file": "f", "head commit": "h",
- "parent commit": "pc", "tdiff": "td"},
+ "parent commit": "pc", "tdiff": "td", "data": "dat"},
"author": {"blob": "fb", "commit": "c", "file": "f", "project": "p"},
"blob": {"author": "fa", "commit": "c", "file": "f",
"old blob": "ob", "tokens": "tk"},
"project": {"author": "a", "commit": "c", "central commit": "Pc"},
"file": {"author": "a", "blob": "b", "commit": "c"}
}
-//add back in when fixed: "commit": {"time author": "ta"}
+//add back in when fixed: "commit": {"data": "dat"}
export {options};
diff --git a/client/app/components/Sampling/SamplingRestrictionForm.js b/client/app/components/Sampling/SamplingRestrictionForm.js
index 943c940..9865756 100644
--- a/client/app/components/Sampling/SamplingRestrictionForm.js
+++ b/client/app/components/Sampling/SamplingRestrictionForm.js
@@ -1,10 +1,8 @@
import React, { Component } from 'react';
-// import { FilterableContent } from 'react-filterable-content';
import { withRouter } from "react-router-dom";
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { Multiselect } from 'multiselect-react-dropdown';
-import { saveAs } from 'file-saver';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import Checkbox from '@material-ui/core/Checkbox';
import DatePicker from '@material-ui/lab/DatePicker';
@@ -13,7 +11,6 @@ import LocalizationProvider from 'material-ui/lab/LocalizationProvider';
import {
Button,
Card,
- CardHeader,
CardBody,
FormGroup,
Label,
diff --git a/client/app/components/Sampling/SamplingRestrictionPage.js b/client/app/components/Sampling/SamplingRestrictionPage.js
index b069fea..6f97cfa 100644
--- a/client/app/components/Sampling/SamplingRestrictionPage.js
+++ b/client/app/components/Sampling/SamplingRestrictionPage.js
@@ -1,11 +1,10 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
-import { withRouter } from "react-router-dom";
import { getSampling } from '../../../actions/sampling';
import SamplingRestrictionForm from './SamplingRestrictionForm';
-class SamplingRestrictionPage extends React.Component {
+class SamplingRestrictionPage extends Component {
render() {
const { getSampling } = this.props;
return (
diff --git a/client/app/components/Upload/UploadAuthorsPage.js b/client/app/components/Upload/UploadAuthorsPage.js
index 627c3e2..c49ddc8 100644
--- a/client/app/components/Upload/UploadAuthorsPage.js
+++ b/client/app/components/Upload/UploadAuthorsPage.js
@@ -1,24 +1,12 @@
import React, { Component } from 'react';
-import { connect } from 'react-redux';
-import PropTypes from 'prop-types';
import { withRouter } from "react-router-dom";
import {
Button,
Card,
CardHeader,
CardBody,
- NavItem,
- NavLink,
- Nav,
- Progress,
- Table,
- Container,
Row,
- Col,
- Modal,
- ModalBody,
- ModalHeader,
- ModalFooter
+ Col
} from "reactstrap";
class UploadAuthorsPage extends Component {
diff --git a/client/app/components/common/DashboardStatCard.js b/client/app/components/common/DashboardStatCard.js
index 6e04227..4d90d4b 100644
--- a/client/app/components/common/DashboardStatCard.js
+++ b/client/app/components/common/DashboardStatCard.js
@@ -1,7 +1,5 @@
import React from 'react';
import { Card, CardBody, CardTitle, Row, Col } from "reactstrap";
-import ReactDOM from 'react-dom';
-import PropTypes from 'prop-types';
const DashboardStatCard = ({
title, stat, icon, color, blurb
diff --git a/client/app/components/common/FriendStatTable.js b/client/app/components/common/FriendStatTable.js
index 500f064..015ba90 100644
--- a/client/app/components/common/FriendStatTable.js
+++ b/client/app/components/common/FriendStatTable.js
@@ -2,17 +2,10 @@ import React from "react";
// reactstrap components
import {
- Container,
Row,
- Col,
Card,
CardHeader,
- Button,
Table,
- Modal,
- ModalHeader,
- ModalBody,
- ModalFooter
}from "reactstrap";
//import { styles } from './styles';
diff --git a/client/app/components/common/MultiValueGroup.js b/client/app/components/common/MultiValueGroup.js
index 4f2a6f1..6c4bb82 100644
--- a/client/app/components/common/MultiValueGroup.js
+++ b/client/app/components/common/MultiValueGroup.js
@@ -1,5 +1,4 @@
import React from 'react';
-import ReactDOM from 'react-dom';
import { WithContext as ReactTags } from 'react-tag-input';
import '../../styles/react-tags.css';
import PropTypes from 'prop-types';
diff --git a/client/app/components/common/ProjStatTable.js b/client/app/components/common/ProjStatTable.js
index aa11595..f48b7ba 100644
--- a/client/app/components/common/ProjStatTable.js
+++ b/client/app/components/common/ProjStatTable.js
@@ -1,7 +1,13 @@
import React from "react";
// reactstrap components
-import { Container, Row, Col, Card, CardHeader, Button, Table, UncontrolledTooltip } from "reactstrap";
+import {
+ Row,
+ Card,
+ CardHeader,
+ Table,
+ UncontrolledTooltip
+} from "reactstrap";
import { styles } from './styles';
class ProjStatTable extends React.Component {
diff --git a/client/app/index.js b/client/app/index.js
index 13355a8..84b2361 100644
--- a/client/app/index.js
+++ b/client/app/index.js
@@ -3,7 +3,6 @@ import { render } from 'react-dom';
import { Provider } from 'react-redux';
import thunk from 'redux-thunk';
import { createStore, applyMiddleware, compose } from 'redux';
-import RootReducer from '../rootReducer';
import App from './components/App/App';
import NotFound from './components/App/NotFound';
import Home from './components/Home/Home';
@@ -31,7 +30,6 @@ import { setCurrentUser } from '../actions/signUpActions';
import {
BrowserRouter as Router,
Route,
- Link,
Switch
} from 'react-router-dom'
import "../public/assets/vendor/nucleo/css/nucleo.css";