Skip to content

Commit

Permalink
Add new UI
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsparrow committed Mar 11, 2024
1 parent d9cf8f0 commit d032576
Show file tree
Hide file tree
Showing 22 changed files with 764 additions and 140 deletions.
2 changes: 1 addition & 1 deletion metadata/gql/facet.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (f DatasetSchema) UpdatedAt() time.Time {
func CreateDatasetSchema(facetData *ent.Facet) (*DatasetSchema, error) {
var datasetSchema facet.DatasetSchema

err := decodeJson(facetData, &datasetSchema)
err := decodeJson(facetData.Data, &datasetSchema)

if err != nil {
return nil, errors.Join(err, errors.New("failed decoding"))
Expand Down
2 changes: 1 addition & 1 deletion metadata/trawler.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions ui/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<!doctype html>
<html lang="en">
<html class="h-full bg-gray-100" lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/trawler.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>trawler</title>
</head>
<body class="dark:bg-gray-900">


<body class="h-full">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
Expand Down
111 changes: 111 additions & 0 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"preview": "vite preview"
},
"dependencies": {
"@headlessui/react": "^1.7.18",
"@heroicons/react": "^2.1.1",
"graphql": "^16.8.1",
"luxon": "^3.4.4",
Expand All @@ -26,6 +27,7 @@
"@graphql-codegen/near-operation-file-preset": "^3.0.0",
"@graphql-codegen/typed-document-node": "^5.0.6",
"@parcel/watcher": "^2.4.1",
"@tailwindcss/forms": "^0.5.7",
"@types/luxon": "^3.4.2",
"@types/react": "^18.2.56",
"@types/react-dom": "^18.2.19",
Expand Down
4 changes: 2 additions & 2 deletions ui/src/App.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.logo {
height: 6em;
padding: 1.5em;
/* height: 6em;
padding: 1.5em; */
will-change: filter;
transition: filter 300ms;
}
Expand Down
21 changes: 9 additions & 12 deletions ui/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
import "./App.css";
import { UrqlProvider } from "./graphql";
import logo from "./assets//trawler.svg";
import Datasets from "./Datasets";
import { NavLink, Route, Routes } from "react-router-dom";
import { Dataset } from "./Dataset";
import Entities from "./pages/Dashboard";
import { Route, Routes } from "react-router-dom";
import { Entity } from "./pages/Entity";
import Layout from "./components/layout/Layout";

function App() {
return (
<UrqlProvider url="/graphql">
<div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
<NavLink to="/">
<img src={logo} className="logo react" alt="logo" />
</NavLink>

<Layout>
<Routes>
<Route path="/" element={<Datasets />} />
<Route path="/dataset/:datasetId" element={<Dataset />} />
<Route path="/" element={<Entities />} />
<Route path="/entity/:id" element={<Entity />} />
<Route path="/entity/:id/:tab" element={<Entity />} />
</Routes>
</div>
</Layout>
</UrqlProvider>
);
}
Expand Down
22 changes: 0 additions & 22 deletions ui/src/Dataset.graphql

This file was deleted.

16 changes: 0 additions & 16 deletions ui/src/Dataset.tsx

This file was deleted.

83 changes: 0 additions & 83 deletions ui/src/Datasets.tsx

This file was deleted.

0 comments on commit d032576

Please sign in to comment.