diff --git a/src/Router.jsx b/src/Router.jsx
index cc1016a..610308a 100644
--- a/src/Router.jsx
+++ b/src/Router.jsx
@@ -1,7 +1,7 @@
import React from "react";
import { Routes, BrowserRouter, Route } from "react-router-dom";
import HomePage from "./pages/Home/HomePage.jsx";
-import Executions from "./components/Executions.jsx";
+import ExecutionsPage from "./pages/Executions/ExecutionsPage.jsx";
import ScriptsPage from "./pages/Script/ScriptsPage.jsx";
import Dagre from "./components/dagre/Dagre.jsx";
import NotFoundPage from "./pages/Error/NotFoundPage.jsx";
@@ -14,7 +14,7 @@ const Router = () => {
}>
} />
} />
- } />
+ } />
} />
} />
diff --git a/src/components/Executions.jsx b/src/components/Executions.jsx
deleted file mode 100644
index 4322605..0000000
--- a/src/components/Executions.jsx
+++ /dev/null
@@ -1,96 +0,0 @@
-import React, { Fragment } from "react";
-import {
- ABSOLUTE_PATH,
- DISPLAY_NAME,
- EXECUTION_DURATION,
- FINISH_DATE_UNIX,
- Rest,
- START_DATE_UNIX,
- TRANSFORMATION,
-} from "./rest/Rest";
-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 { Link } from "react-router-dom";
-
-class Executions extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- data: [],
- };
- }
-
- componentDidMount() {
- Rest.getExecutions().then((response) => {
- console.log(response);
- this.setState({ data: response });
- });
- }
-
- render() {
- if (this.state.data === []) {
- return
Loading
;
- } else {
- return (
- <>
- Executions
-
-
-
- Status |
- Name |
- Started |
- Finished |
- Duration |
- Action |
-
-
-
- {this.state.data
- .filter((v) => {
- return v !== null;
- })
- .map((data, key) => {
- return (
-
-
-
- |
- {data[DISPLAY_NAME]} |
- {data[EXECUTION_DURATION]}ms |
-
-
-
-
-
-
-
-
- {
- window.open(
- data["http://onto.fel.cvut.cz/ontologies/s-pipes/rdf4j-transformation-id"],
- "_blank",
- );
- }}
- >
-
-
- {/**/}
- {/**/}
-
-
- |
-
- );
- })}
-
-
- >
- );
- }
- }
-}
-
-export default Executions;
diff --git a/src/pages/Executions/ExecutionsPage.jsx b/src/pages/Executions/ExecutionsPage.jsx
new file mode 100644
index 0000000..9640cb2
--- /dev/null
+++ b/src/pages/Executions/ExecutionsPage.jsx
@@ -0,0 +1,122 @@
+import React, { useEffect, useState } from "react";
+import {
+ ABSOLUTE_PATH,
+ DISPLAY_NAME,
+ EXECUTION_DURATION,
+ FINISH_DATE_UNIX,
+ Rest,
+ START_DATE_UNIX,
+ TRANSFORMATION,
+} from "../../components/rest/Rest.jsx";
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableContainer,
+ TableHead,
+ TableRow,
+ Typography,
+ IconButton,
+ CircularProgress,
+ Box,
+} from "@mui/material";
+import EditIcon from "@mui/icons-material/Edit";
+import HelpIcon from "@mui/icons-material/Help";
+import AccessTimeIcon from "@mui/icons-material/AccessTime";
+import { Link } from "react-router-dom";
+
+const ExecutionsPage = () => {
+ const [data, setData] = useState([]);
+ const [loading, setLoading] = useState(true);
+
+ useEffect(() => {
+ const fetchData = async () => {
+ try {
+ const response = await Rest.getExecutions();
+ setData(response);
+ } catch (error) {
+ console.error("Error fetching data:", error);
+ } finally {
+ setLoading(false);
+ }
+ };
+ fetchData();
+ }, []);
+
+ if (loading) {
+ return (
+
+
+
+ );
+ }
+
+ return (
+ <>
+
+ Executions
+
+
+
+
+
+ Status
+ Name
+ Started
+ Finished
+ Duration
+ Action
+
+
+
+ {data
+ .filter((v) => v !== null)
+ .map((data, key) => {
+ return (
+
+
+
+
+ {data[DISPLAY_NAME]}
+ {data[START_DATE_UNIX] || "N/A"}
+ {data[FINISH_DATE_UNIX] || "N/A"}
+ {data[EXECUTION_DURATION]} ms
+
+
+
+
+ {
+ window.open(
+ data["http://onto.fel.cvut.cz/ontologies/s-pipes/rdf4j-transformation-id"],
+ "_blank",
+ );
+ }}
+ >
+
+
+
+
+ );
+ })}
+
+
+
+ >
+ );
+};
+
+export default ExecutionsPage;