Skip to content

Commit

Permalink
[#86] Implement Axios API instance, create apiFetchers, and refactor …
Browse files Browse the repository at this point in the history
…API endpoints into separate constants file
  • Loading branch information
palagdan committed Nov 12, 2024
1 parent 7c40d6b commit 21d20f9
Show file tree
Hide file tree
Showing 16 changed files with 274 additions and 280 deletions.
2 changes: 1 addition & 1 deletion src/components/Executions.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import Layout from "./Layout";
import { ABSOLUTE_PATH, DISPLAY_NAME, EXECUTION_DURATION, TRANSFORMATION } from "../constants/Vocabulary.js";
import Rest from "./rest/Rest.jsx";
import Rest from "../rest/Rest.jsx";
import { Col, Container, Row, Table } from "react-bootstrap";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faMugHot, faEdit, faQuestion } from "@fortawesome/free-solid-svg-icons";
Expand Down
2 changes: 1 addition & 1 deletion src/components/ModuleTypesSelection.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { Dropdown } from "semantic-ui-react";
import Rest from "./rest/Rest";
import Rest from "../rest/Rest";
import { ICONS_MAP } from "./dagre/DagreIcons";

class ModuleTypesSelection extends React.Component {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ScriptFunctionSelection.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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 Rest from "../rest/Rest.jsx";

class ScriptFunctionSelection extends React.Component {
constructor(props) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/dagre/Dagre.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import cxtmenu from "cytoscape-cxtmenu";
import popper from "cytoscape-popper";
import navigator from "cytoscape-navigator";
import expandCollapse from "cytoscape-expand-collapse";
import Rest from "../rest/Rest.jsx";
import Rest from "../../rest/Rest.jsx";
import NavbarMenu from "../NavbarMenu";
import SFormsModal from "../sform/SFormsModal";
import ModuleTypesSelection from "../ModuleTypesSelection";
Expand Down
2 changes: 1 addition & 1 deletion src/components/modal/FunctionExecutionModal.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 { Rest } from "../rest/Rest";
import { Rest } from "../../rest/Rest";

class FunctionExecutionModal extends React.Component {
constructor(props) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/modal/MoveModuleModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";

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 Rest from "../../rest/Rest.jsx";

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

import { Alert, Button, Col, Container, Form, Modal, Row } from "react-bootstrap";
import Rest from "../../rest/Rest.jsx";

class ScriptOntologyModal extends React.Component {
constructor(props) {
Expand Down
270 changes: 0 additions & 270 deletions src/components/rest/Rest.jsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/sform/SFormsFunctionModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import SForms from "@kbss-cvut/s-forms";

import { Button, Modal } from "react-bootstrap";
import Rest from "../rest/Rest";
import Rest from "../../rest/Rest";
import "@triply/yasgui/build/yasgui.min.css";
import ErrorModal from "../modal/ErrorModal";

Expand Down
2 changes: 1 addition & 1 deletion src/components/sform/SFormsModal.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import SForms from "@kbss-cvut/s-forms";
import { Button, Modal } from "react-bootstrap";
import Rest from "../rest/Rest";
import Rest from "../../rest/Rest";
import Loading from "../Loading";
import "@triply/yasgui/build/yasgui.min.css";
import ErrorModal from "../modal/ErrorModal";
Expand Down
2 changes: 1 addition & 1 deletion src/components/sform/ScriptInputOutputModal.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";

import { Alert, Button, Form, Modal } from "react-bootstrap";
import Rest from "../rest/Rest";
import Rest from "../../rest/Rest";
import "@triply/yasgui/build/yasgui.min.css";
import JSONPretty from "react-json-pretty";
import "react-json-pretty/themes/monikai.css";
Expand Down
2 changes: 1 addition & 1 deletion src/components/treebeard/ScriptsTree.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { includes } from "lodash";
import styles from "./styles";
import Header from "./Header";
import { Treebeard, decorators } from "react-treebeard";
import Rest from "../rest/Rest";
import Rest from "../../rest/Rest";
import ScriptActionsModuleModal from "../modal/ScriptActionsModuleModal";
import Loading from "../Loading";
import ErrorModal from "../modal/ErrorModal";
Expand Down
Loading

0 comments on commit 21d20f9

Please sign in to comment.