Skip to content

Commit

Permalink
Merge pull request #83 from kbss-cvut/82-refactor-unused
Browse files Browse the repository at this point in the history
Refactor unused components and imports
  • Loading branch information
blcham authored Nov 12, 2024
2 parents 62469d0 + dcaef8c commit 4378baf
Show file tree
Hide file tree
Showing 23 changed files with 12 additions and 192 deletions.
5 changes: 0 additions & 5 deletions src/components/App.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { Component } from "react";
import { Switch, BrowserRouter as Router, Route } from "react-router-dom";
import importedComponent from "react-imported-component";

import Home from "./Home";
import Loading from "./Loading";

Expand All @@ -11,9 +10,6 @@ const Scripts = importedComponent(() => import(/* webpackChunkName:'Scripts' */
const Executions = importedComponent(() => import(/* webpackChunkName:'Executions' */ "./Executions"), {
LoadingComponent: Loading,
});
const AsyncDynamicPAge = importedComponent(() => import(/* webpackChunkName:'DynamicPage' */ "./DynamicPage"), {
LoadingComponent: Loading,
});
const AsyncDagre = importedComponent(() => import(/* webpackChunkName:'Dagre' */ "./dagre/Dagre.jsx"), {
LoadingComponent: Loading,
});
Expand All @@ -30,7 +26,6 @@ class App extends Component {
<Route exact path="/" component={Home} />
<Route exact path="/scripts" component={Scripts} />
<Route exact path="/executions" component={Executions} />
{/*<Route exact path="/dynamic" component={AsyncDynamicPAge} />*/}
<Route exact path="/script" component={AsyncDagre} />
<Route component={AsyncNoMatch} />
</Switch>
Expand Down
15 changes: 0 additions & 15 deletions src/components/DynamicPage.jsx

This file was deleted.

14 changes: 3 additions & 11 deletions src/components/Executions.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
import React, { Fragment } from "react";

import React from "react";
import Layout from "./Layout";
import {
ABSOLUTE_PATH,
DISPLAY_NAME,
EXECUTION_DURATION,
FINISH_DATE_UNIX,
START_DATE_UNIX,
TRANSFORMATION,
} from "../constants/Vocabulary.js";
import { ABSOLUTE_PATH, DISPLAY_NAME, EXECUTION_DURATION, TRANSFORMATION } from "../constants/Vocabulary.js";
import Rest from "./rest/Rest.jsx";
import { Col, Container, Row, Table } from "react-bootstrap";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faMugHot, faTrash, faRunning, faPlayCircle, faEdit, faQuestion } from "@fortawesome/free-solid-svg-icons";
import { faMugHot, faEdit, faQuestion } from "@fortawesome/free-solid-svg-icons";
import { Link } from "react-router-dom";

class Executions extends React.Component {
Expand Down
33 changes: 0 additions & 33 deletions src/components/Features.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/Home.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React from "react";
import { Grid } from "semantic-ui-react";

import Layout from "./Layout";
import ScriptsTree from "./treebeard/ScriptsTree";
import { Link } from "react-router-dom";

class Home extends React.Component {
render() {
Expand Down
3 changes: 1 addition & 2 deletions src/components/Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from "react";
import { Container, Icon } from "semantic-ui-react";

import { Nav, Navbar } from "react-bootstrap";
import { Navbar } from "react-bootstrap";
import NavbarMenu from "./NavbarMenu";

const Layout = ({ children }) => {
Expand Down
1 change: 0 additions & 1 deletion src/components/Loading.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import Spinner from "./spinner/Spinner";
import { DelayRender } from "./DelayRender";

Expand Down
32 changes: 0 additions & 32 deletions src/components/Profile.jsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/ScriptFunctionSelection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from "react";
import { Dropdown } from "semantic-ui-react";
import { FUNCTION_URI, FUNCTION_NAME } from "../constants/Vocabulary.js";
import Rest from "./rest/Rest.jsx";
import { ICONS_MAP } from "./dagre/DagreIcons";

class ScriptFunctionSelection extends React.Component {
constructor(props) {
Expand Down
2 changes: 0 additions & 2 deletions src/components/Scripts.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React from "react";
import { Grid } from "semantic-ui-react";

import Layout from "./Layout";
import ScriptsTree from "./treebeard/ScriptsTree";
import { Link } from "react-router-dom";

class Scripts extends React.Component {
render() {
Expand Down
6 changes: 0 additions & 6 deletions src/components/dagre/Dagre.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@ import {
SOURCE_NODE,
DESTINATION_NODE,
NODE,
ICON,
COMMENT,
ANSWERS,
OBJECT_VALUE,
COMPONENT,
FUNCTION_LOCAL_NAME,
FUNCTION_URI,
INPUT_PARAMETER,
OUTPUT_PARAMETER,
GROUP,
Expand Down
2 changes: 0 additions & 2 deletions src/components/dagre/DagreIcons.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from "react";

export const ICONS_MAP = {
"http://onto.fel.cvut.cz/ontologies/lib/module/improve-spo-with-marginals": "battery.png",
"http://onto.fel.cvut.cz/ontologies/lib/module/import-e5x": "angle-up.png",
Expand Down
2 changes: 1 addition & 1 deletion src/components/modal/ErrorModal.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

import { Button, Form, Modal } from "react-bootstrap";
import { Button, Modal } from "react-bootstrap";

class ErrorModal extends React.Component {
constructor(props) {
Expand Down
1 change: 0 additions & 1 deletion src/components/modal/FunctionExecutionModal.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from "react";

import { Button, Form, Modal } from "react-bootstrap";
import { Rest } from "../rest/Rest";

Expand Down
20 changes: 2 additions & 18 deletions src/components/modal/MoveModuleModal.jsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
import React from "react";

import { Alert, Button, Col, Container, Form, Modal, Row, Table } from "react-bootstrap";
import {
ABSOLUTE_PATH,
DISPLAY_NAME,
ERROR_MESSAGE,
EXECUTION_DURATION,
FINISH_DATE_UNIX,
MODULE_URI,
ONTOLOGY_URI,
RULE_COMMENT,
SCRIPT_PATH,
START_DATE_UNIX,
TRANSFORMATION,
} from "../../constants/Vocabulary.js";
import { Alert, Button, Col, Container, Modal, Row } from "react-bootstrap";
import { ONTOLOGY_URI, SCRIPT_PATH } from "../../constants/Vocabulary.js";
import Rest from "../rest/Rest.jsx";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faEdit, faMugHot, faPlayCircle, faTrash } from "@fortawesome/free-solid-svg-icons";
import { Link } from "react-router-dom";
import Layout from "../Layout";

class MoveModuleModal extends React.Component {
constructor(props) {
Expand Down
17 changes: 0 additions & 17 deletions src/components/modal/ScriptActionsModuleModal.jsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
import React from "react";

import { Alert, Button, Col, Container, Form, Modal, Row, Table } from "react-bootstrap";
import {
ABSOLUTE_PATH,
DISPLAY_NAME,
ERROR_MESSAGE,
EXECUTION_DURATION,
FINISH_DATE_UNIX,
MODULE_URI,
ONTOLOGY_URI,
RULE_COMMENT,
SCRIPT_PATH,
START_DATE_UNIX,
TRANSFORMATION,
} from "../../constants/Vocabulary.js";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faEdit, faMugHot, faPlayCircle, faTrash } from "@fortawesome/free-solid-svg-icons";
import { Link } from "react-router-dom";
import Layout from "../Layout";

class ScriptActionsModuleModal extends React.Component {
constructor(props) {
Expand Down
7 changes: 2 additions & 5 deletions src/components/modal/ScriptExecutionModal.jsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import React from "react";

import { Alert, Button, Col, Container, Modal, Row, Table } from "react-bootstrap";
import { Button, Modal, Table } from "react-bootstrap";
import {
MODULE_EXECUTION_FINISH_DATE,
MODULE_EXECUTION_START_DATE,
MODULE_EXECUTION_DURATION,
MODULE_URI,
MODULE_INPUT_PATH,
MODULE_OUTPUT_PATH,
EXECUTION_VARIABLE,
MODULE_VARIABLES,
MODULE_VARIABLE_NAME,
MODULE_VARIABLE_VALUE,
} from "../../constants/Vocabulary.js";
import { faDownload, faMugHot } from "@fortawesome/free-solid-svg-icons";
import { faDownload } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";

class ScriptOntologyModal extends React.Component {
Expand Down
19 changes: 1 addition & 18 deletions src/components/modal/ScriptOntologyModal.jsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
import React from "react";

import { Alert, Button, Col, Container, Form, Modal, Row, Table } from "react-bootstrap";
import {
ABSOLUTE_PATH,
DISPLAY_NAME,
ERROR_MESSAGE,
EXECUTION_DURATION,
FINISH_DATE_UNIX,
MODULE_URI,
ONTOLOGY_URI,
RULE_COMMENT,
SCRIPT_PATH,
START_DATE_UNIX,
TRANSFORMATION,
} from "../../constants/Vocabulary.js";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faEdit, faMugHot, faPlayCircle, faPlusCircle, faTrash } from "@fortawesome/free-solid-svg-icons";
import { Link } from "react-router-dom";
import Layout from "../Layout";
import { Alert, Button, Col, Container, Form, Modal, Row } from "react-bootstrap";

class ScriptOntologyModal extends React.Component {
constructor(props) {
Expand Down
18 changes: 2 additions & 16 deletions src/components/modal/ValidationReportModal.jsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
import React from "react";

import { Alert, Button, Col, Container, Form, Modal, Row } from "react-bootstrap";
import {
ABSOLUTE_PATH,
DISPLAY_NAME,
ERROR_MESSAGE,
EXECUTION_DURATION,
FINISH_DATE_UNIX,
MODULE_URI,
RULE_COMMENT,
START_DATE_UNIX,
TRANSFORMATION,
} from "../../constants/Vocabulary.js";
import Rest from "../rest/Rest.jsx";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faEdit, faMugHot, faPlayCircle, faTrash } from "@fortawesome/free-solid-svg-icons";
import { Link } from "react-router-dom";
import { Alert, Button, Col, Container, Modal, Row } from "react-bootstrap";
import { ERROR_MESSAGE, MODULE_URI, RULE_COMMENT } from "../../constants/Vocabulary.js";

class FunctionExecutionModal extends React.Component {
constructor(props) {
Expand Down
1 change: 0 additions & 1 deletion src/components/rest/Rest.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import * as Vocabulary from "../../constants/Vocabulary.js";

const postRequestOptions = {
Expand Down
1 change: 0 additions & 1 deletion src/components/sform/SFormsFunctionModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Button, Modal } from "react-bootstrap";
import Rest from "../rest/Rest";
import "@triply/yasgui/build/yasgui.min.css";
import ErrorModal from "../modal/ErrorModal";
import ScriptActionsModuleModal from "../modal/ScriptActionsModuleModal";

class SFormsFunctionModal extends React.Component {
constructor(props) {
Expand Down
1 change: 0 additions & 1 deletion src/components/sform/ScriptInputOutputModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from "react";

import { Alert, Button, Form, Modal } from "react-bootstrap";
import Rest from "../rest/Rest";
import Yasgui from "@triply/yasgui";
import "@triply/yasgui/build/yasgui.min.css";
import JSONPretty from "react-json-pretty";
import "react-json-pretty/themes/monikai.css";
Expand Down
1 change: 0 additions & 1 deletion src/components/treebeard/ScriptsTree.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { Fragment } from "react";
import { includes } from "lodash";

import styles from "./styles";
import Header from "./Header";
import { Treebeard, decorators } from "react-treebeard";
Expand Down

0 comments on commit 4378baf

Please sign in to comment.