Skip to content

Commit

Permalink
update app deps, df -> dataframe
Browse files Browse the repository at this point in the history
  • Loading branch information
cecoeco committed Oct 17, 2024
1 parent 1f4494a commit 6af95c1
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 41 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PRISMA"
uuid = "7b67a8d2-c4f5-4933-b91c-0fc427024db5"
authors = ["Ceco Elijah Maples <mapleselijah9@gmail.com>", "PRISMA.jl Contributors"]
version = "0.0.8"
version = "0.0.9"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand Down
2 changes: 1 addition & 1 deletion app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ RUN apt-get update && apt-get install -y \
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs

ENTRYPOINT [ "julia", "--project", "src-oxygen/index.jl" ]
ENTRYPOINT [ "julia", "--project", "src-oxygen/app.jl" ]
2 changes: 1 addition & 1 deletion app/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.10.4"
manifest_format = "2.0"
project_hash = "978be966e9da3af26653d9bdffeabd57c427fec7"
project_hash = "ebcfc8abde6e01c63cbafe593b19dcbb6952530b"

[[deps.AbstractTrees]]
git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177"
Expand Down
2 changes: 2 additions & 0 deletions app/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
HTMLTables = "b1afcece-b80e-4563-b90e-36b4cc56d3fa"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
Expand All @@ -8,6 +9,7 @@ Oxygen = "df9a0d86-3283-4920-82dc-4555fc0d1d8b"
PRISMA = "7b67a8d2-c4f5-4933-b91c-0fc427024db5"

[compat]
DataFrames = "1.7"
HTMLTables = "0.5"
HTTP = "1"
JSON3 = "1"
Expand Down
10 changes: 4 additions & 6 deletions app/src-oxygen/index.jl → app/src-oxygen/app.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module AppPRISMA

using DataFrame, HTMLTables, HTTP, JSON3, JSONTables, NodeJS, Oxygen, PRISMA
using DataFrames, HTMLTables, HTTP, JSON3, JSONTables, NodeJS, Oxygen, PRISMA

const DIRECTORY::String = Base.Filesystem.dirname(Base.@__DIR__)

Expand All @@ -22,8 +22,6 @@ function build_reactjs(; build_directory::String)::Nothing
Base.run(`$(NodeJS.npm_cmd()) install`)
Base.run(`$(NodeJS.npm_cmd()) run build`)

Base.CoreLogging.@info "Finished building frontend"

return nothing
end

Expand Down Expand Up @@ -55,13 +53,13 @@ function serve_reactjs(; build_directory::String)::Nothing
for path in Base.Filesystem.readdir(build_directory; join=true)
filename::String = Base.Filesystem.basename(path)
if filename == "index.html"
for page in ["", "checklist", "flow_diagram"]
Oxygen.get("/$page") do
for page in ["", "checklist", "flow_diagram", "*"]
Oxygen.get(page) do
Oxygen.file(path)
end
end
else
Oxygen.get("/$filename") do
Oxygen.get(filename) do
Oxygen.file(path)
end
end
Expand Down
29 changes: 29 additions & 0 deletions app/src-react/app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from "react";
import { BrowserRouter, Route, Routes } from "react-router-dom";

import Header from "./components/header.tsx";
import Footer from "./components/footer.tsx";

import Home from "./pages/home.tsx";
import Checklist from "./pages/checklist.tsx";
import FlowDiagram from "./pages/flow_diagram.tsx";
import NotFound from "./pages/notfound.tsx";

const App: React.FC = () => {
return (
<React.StrictMode>
<BrowserRouter>
<Header />
<Routes>
<Route path="/" element={<Home />} />
<Route path="/checklist" element={<Checklist />} />
<Route path="/flow_diagram" element={<FlowDiagram />} />
<Route path="*" element={<NotFound />} />
</Routes>
<Footer />
</BrowserRouter>
</React.StrictMode>
);
};

export default App;
4 changes: 2 additions & 2 deletions app/src-react/assets/css/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ footer {
padding: 0 1%;
font-size: .8rem;
/*border-top: 1px solid var(--border-color);*/
color: var(--text-color-1);
color: var(--input-text-color);
}

footer a {
color: var(--text-color-1);
color: var(--input-text-color);
}
35 changes: 5 additions & 30 deletions app/src-react/index.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,8 @@
import React from "react";
import ReactDOM from "react-dom/client";
import { BrowserRouter, Route, Routes } from "react-router-dom";

import App from "./app.tsx";
import "./assets/css/index.css";

import Header from "./components/header.tsx";
import Footer from "./components/footer.tsx";

import Home from "./pages/home.tsx";
import Checklist from "./pages/checklist.tsx";
import FlowDiagram from "./pages/flow_diagram.tsx";
import NotFound from "./pages/notfound.tsx";

const rootElement = document.getElementById("root") as HTMLDivElement;

if (rootElement) {
const root = ReactDOM.createRoot(rootElement);
root.render(
<React.StrictMode>
<BrowserRouter>
<Header />
<Routes>
<Route path="/" element={<Home />} />
<Route path="/checklist" element={<Checklist />} />
<Route path="/flow_diagram" element={<FlowDiagram />} />
<Route path="*" element={<NotFound />} />
</Routes>
<Footer />
</BrowserRouter>
</React.StrictMode>
);
}
const container = document.getElementById("root") as HTMLElement;
if (!container) throw new Error("Root container missing in index.html");
const root = ReactDOM.createRoot(container);
root.render(<App />);

0 comments on commit 6af95c1

Please sign in to comment.