diff --git a/docs/api/public/cmf.md b/docs/api/public/cmf.md index 48954594..a6849806 100644 --- a/docs/api/public/cmf.md +++ b/docs/api/public/cmf.md @@ -8,18 +8,12 @@ members: - __init__ - create_context - - merge_created_context - create_execution - update_execution - - merge_created__execution - log_dataset - - log_dataset_with_version - log_model - - log_model_with_version - - log_execution_metrics_from_client - log_execution_metrics - log_metric - - commit_existing_metrics - create_dataslice - update_dataslice diff --git a/ui/public/index.html b/ui/public/index.html index d0acc4ae..3719ef6f 100644 --- a/ui/public/index.html +++ b/ui/public/index.html @@ -52,7 +52,7 @@
- + ↓ + } else if (sortOrder === "asc"){ + return ↑ //data is in asc order ----> ↑ + } else{ + return ↕ //data is in initial order -----------> ↕ + } + } return ( -@@ -129,13 +131,13 @@ const ArtifactTable = ({ artifacts, ArtifactType, onSort, onFilter }) => { | - {artifacts.length > 0 && artifacts.map((data, index) => ( + {sortedData.length > 0 && sortedData.map((data, index) => (|||
---|---|---|---|
toggleRow(index)}> + | toggleRow(index)}> {expandedRow === index ? "-" : "+"} | {data.id} | @@ -190,4 +192,4 @@ const ArtifactTable = ({ artifacts, ArtifactType, onSort, onFilter }) => { ); }; -export default ArtifactTable; +export default ArtifactTable; \ No newline at end of file diff --git a/ui/src/components/ExecutionTable/index.jsx b/ui/src/components/ExecutionTable/index.jsx index 13ed976d..b3e26024 100644 --- a/ui/src/components/ExecutionTable/index.jsx +++ b/ui/src/components/ExecutionTable/index.jsx @@ -19,27 +19,34 @@ import React, { useState, useEffect } from "react"; import "./index.css"; -const ExecutionTable = ({ executions, onSort, onFilter }) => { - - // Default sorting order - const [sortOrder, setSortOrder] = useState("Context_Type"); +const ExecutionTable = ({ executions, onSort, onFilter}) => { +// Default sorting order + const [sortOrder, setSortOrder] = useState(onSort); + const [sortedData, setSortedData] = useState([]); // Local filter value state const [filterValue, setFilterValue] = useState(""); - const [expandedRow, setExpandedRow] = useState(null); const consistentColumns = []; useEffect(() => { // Set initial sorting order when component mounts - setSortOrder("asc"); - }, []); + setSortedData([...executions]); + }, [executions]); + const handleSort = () => { - const newSortOrder = sortOrder === "asc" ? "desc" : "asc"; + const newSortOrder = sortOrder === "desc" ? "asc" : sortOrder === "asc" ? "desc" : "asc"; setSortOrder(newSortOrder); - onSort("Context_Type", newSortOrder); // Notify parent component about sorting change + const sorted = [...executions].sort((a, b) => { + if(newSortOrder === "asc"){ + return a.Context_Type.localeCompare(b.Context_Type); + }else{ + return b.Context_Type.localeCompare(a.Context_Type); + } + }); + setSortedData(sorted); // Notify parent component about sorting change }; const handleFilterChange = (event) => { @@ -56,13 +63,24 @@ const ExecutionTable = ({ executions, onSort, onFilter }) => { } }; + const renderArrow = () => { + if (sortOrder === "desc"){ + return ↓ //data is in desc order ---> ↓ + } else if (sortOrder === "asc"){ + return ↑ //data is in asc order ----> ↑ + } else{ + return ↕ //data is in initial order -----------> ↕ + } + } + return (Execution @@ -106,14 +123,14 @@ const ExecutionTable = ({ executions, onSort, onFilter }) => { |
+ | {expandedRow === index ? "-" : "+"} | {data.Context_Type} | @@ -160,4 +177,4 @@ const ExecutionTable = ({ executions, onSort, onFilter }) => { ); }; -export default ExecutionTable; +export default ExecutionTable; \ No newline at end of file diff --git a/ui/src/components/ExecutionTree/index.jsx b/ui/src/components/ExecutionTree/index.jsx index 1ed8cb50..bc670ed1 100644 --- a/ui/src/components/ExecutionTree/index.jsx +++ b/ui/src/components/ExecutionTree/index.jsx @@ -116,7 +116,6 @@ const constructTangleLayout = (levels, options = {}) => { l.xt = l.target.x; l.yt = l.target.y + l.target.bundles_index[l.bundle.id].i * metro_d - (l.target.bundles.length * metro_d) / 2 + metro_d / 2; l.xb = l.bundle.x; - l.yb = l.bundle.y; l.xs = l.source.x; l.ys = l.source.y; }); @@ -130,7 +129,7 @@ const constructTangleLayout = (levels, options = {}) => { links.forEach(l => { l.yt = l.target.y + l.target.bundles_index[l.bundle.id].i * metro_d - (l.target.bundles.length * metro_d) / 2 + metro_d / 2; l.ys = l.source.y; - l.c1 = l.source.level - l.target.level > 1 ? Math.min(options.bigc, l.xb - l.xt, l.yb - l.yt) - c : c; + l.c1 = c; l.c2 = c; }); diff --git a/ui/src/components/Loader/index.css b/ui/src/components/Loader/index.css new file mode 100644 index 00000000..e65852b7 --- /dev/null +++ b/ui/src/components/Loader/index.css @@ -0,0 +1,29 @@ +.loader-container { + position: relative; /* Relative positioning for the loader to be placed absolutely inside */ + width: 100%; + height: 100%; /* Ensure it takes the full height of its parent */ +} + +/* Loader is absolutely positioned within the loader-container */ +.loader { + position: absolute; + top: 100%; + left: 50%; + transform: translate(-50%, -50%); /* Center the loader */ + border: 8px solid #f3f3f3; + border-top: 8px solid #3498db; + border-radius: 50%; + width: 100px; /* Size of the loader */ + height: 100px; /* Size of the loader */ + animation: spin 1.5s linear infinite; + z-index: 9999; /* Ensure it appears on top */ +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} diff --git a/ui/src/components/Loader/index.jsx b/ui/src/components/Loader/index.jsx index 0c224b50..105c6bcb 100644 --- a/ui/src/components/Loader/index.jsx +++ b/ui/src/components/Loader/index.jsx @@ -15,19 +15,14 @@ ***/ -import React from "react"; +import React from 'react'; +import './index.css'; -function Loader() { - return ( -