Skip to content

Commit eba0cf6

Browse files
Revert "678 lab 641 add run job view (#680)"
This reverts commit a155dbd.
1 parent a155dbd commit eba0cf6

File tree

11 files changed

+40
-198
lines changed

11 files changed

+40
-198
lines changed

frontend/app/components/HomeMenu/HomeMenu.tsx

+14-4
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,23 @@ export const HomeMenu = () => {
3838
</ListItemButton>
3939
</ListItem>
4040
<ListItem disablePadding>
41-
<ListItemButton onClick={() => handleNavigation('/graph/add')}>
42-
<ListItemText primary="Add a Graph" />
41+
<ListItemButton onClick={() => handleNavigation('/job/init')}>
42+
<ListItemText primary="Initialize a Job" />
4343
</ListItemButton>
4444
</ListItem>
4545
<ListItem disablePadding>
46-
<ListItemButton onClick={() => handleNavigation('/graph/list')}>
47-
<ListItemText primary="View Graphs" />
46+
<ListItemButton onClick={() => handleNavigation('/job/view')}>
47+
<ListItemText primary="Submit a Job" />
48+
</ListItemButton>
49+
</ListItem>
50+
<ListItem disablePadding>
51+
<ListItemButton onClick={() => handleNavigation('/iograph/draw')}>
52+
<ListItemText primary="Draw an IO Graph" />
53+
</ListItemButton>
54+
</ListItem>
55+
<ListItem disablePadding>
56+
<ListItemButton onClick={() => handleNavigation('/iograph/list')}>
57+
<ListItemText primary="View IO Graphs" />
4858
</ListItemButton>
4959
</ListItem>
5060
<ListItem disablePadding>

frontend/app/graph/add/page.tsx

-100
This file was deleted.

frontend/app/iograph/draw/page.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import React from 'react'
2+
3+
4+
export default function ListDataFiles() {
5+
return <div>ToDo: Add Wireframe for this view</div>
6+
}
File renamed without changes.

frontend/lib/redux/slices/graphAddSlice/gaphAddSlice.ts

-58
This file was deleted.

gateway/handlers/graphs.go

Whitespace-only changes.

gateway/handlers/tools.go

-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ func AddToolHandler(db *gorm.DB) http.HandlerFunc {
7878
CID: cid,
7979
WalletAddress: walletAddress,
8080
Name: tool.Name,
81-
ToolJson: toolJSON,
8281
}
8382

8483
result := db.Create(&toolEntry)
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
-- This just resets the DB to a clean state
2-
-- Clear your schema_migrations (truncate schema_migrations;) table if you want to run this again
3-
-- This should be removed before we do stable stage/production deploys
1+
-- Add the 'name' column without NOT NULL constraint
2+
ALTER TABLE tools ADD COLUMN name VARCHAR(255);
43

5-
DROP TABLE IF EXISTS tools;
6-
DROP TABLE IF EXISTS users;
7-
DROP TABLE IF EXISTS jobs;
8-
DROP TABLE IF EXISTS jobs_id_seq;
9-
DROP TABLE IF EXISTS tool_entities;
10-
DROP TABLE IF EXISTS users_id_seq;
11-
DROP TABLE IF EXISTS data_files;
4+
-- Extract and set the 'name' value from 'ToolJSON' for all rows
5+
UPDATE tools
6+
SET name = sub.name
7+
FROM (
8+
SELECT t.cid, j.value as name
9+
FROM tools t, LATERAL json_each_text(t.tool_json::json) as j(key, value)
10+
WHERE j.key = 'name'
11+
) sub
12+
WHERE tools.cid = sub.cid;
13+
14+
-- Set the NOT NULL constraint on 'name'
15+
ALTER TABLE tools ALTER COLUMN name SET NOT NULL;
16+
17+
-- Drop the 'ToolJSON' column
18+
ALTER TABLE tools DROP COLUMN tool_json;

gateway/models/tool.go

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
package models
22

3-
import (
4-
"gorm.io/datatypes"
5-
)
6-
73
type Tool struct {
8-
CID string `gorm:"primaryKey;column:cid;type:varchar(255);not null"` // column name specified to avoid GORM default snake case
9-
Name string `gorm:"type:text;not null;unique"`
10-
WalletAddress string `gorm:"type:varchar(42);not null"`
11-
ToolJson datatypes.JSON `gorm:"type:json"`
4+
CID string `gorm:"primaryKey;column:cid;type:varchar(255);not null"` // column name specified to avoid GORM default snake case
5+
Name string `gorm:"type:text;not null;unique"`
6+
WalletAddress string `gorm:"type:varchar(42);not null"`
127
}

go.mod

-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ require (
1212
github.com/ipfs/go-ipfs-api v0.3.0
1313
github.com/rs/cors v1.8.2
1414
github.com/spf13/cobra v1.7.0
15-
gorm.io/datatypes v1.2.0
1615
gorm.io/driver/postgres v1.5.2
1716
gorm.io/gorm v1.25.4
1817
)
@@ -80,7 +79,6 @@ require (
8079
github.com/go-openapi/spec v0.20.7 // indirect
8180
github.com/go-openapi/swag v0.22.3 // indirect
8281
github.com/go-pkgz/expirable-cache v1.0.0 // indirect
83-
github.com/go-sql-driver/mysql v1.7.0 // indirect
8482
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
8583
github.com/godbus/dbus/v5 v5.1.0 // indirect
8684
github.com/gogo/protobuf v1.3.2 // indirect
@@ -323,7 +321,6 @@ require (
323321
gopkg.in/warnings.v0 v0.1.2 // indirect
324322
gopkg.in/yaml.v2 v2.4.0 // indirect
325323
gopkg.in/yaml.v3 v3.0.1 // indirect
326-
gorm.io/driver/mysql v1.4.7 // indirect
327324
k8s.io/apimachinery v0.27.2 // indirect
328325
k8s.io/klog/v2 v2.90.1 // indirect
329326
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect

go.sum

-14
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,6 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+
375375
github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY=
376376
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
377377
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
378-
github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc=
379-
github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
380378
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
381379
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
382380
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
@@ -402,8 +400,6 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
402400
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
403401
github.com/golang-migrate/migrate/v4 v4.16.2 h1:8coYbMKUyInrFk1lfGfRovTLAW7PhWp8qQDT2iKfuoA=
404402
github.com/golang-migrate/migrate/v4 v4.16.2/go.mod h1:pfcJX4nPHaVdc5nmdCikFBWtm+UBpiZjRNNsyBbp0/o=
405-
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA=
406-
github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=
407403
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
408404
github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ=
409405
github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
@@ -825,7 +821,6 @@ github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M
825821
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
826822
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
827823
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
828-
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
829824
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
830825
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
831826
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
@@ -1152,14 +1147,12 @@ github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp
11521147
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
11531148
github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU=
11541149
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
1155-
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
11561150
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
11571151
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
11581152
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
11591153
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
11601154
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
11611155
github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
1162-
github.com/microsoft/go-mssqldb v1.0.0 h1:k2p2uuG8T5T/7Hp7/e3vMGTnnR0sU4h8d1CcC71iLHU=
11631156
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
11641157
github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
11651158
github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
@@ -2230,15 +2223,8 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C
22302223
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
22312224
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
22322225
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2233-
gorm.io/datatypes v1.2.0 h1:5YT+eokWdIxhJgWHdrb2zYUimyk0+TaFth+7a0ybzco=
2234-
gorm.io/datatypes v1.2.0/go.mod h1:o1dh0ZvjIjhH/bngTpypG6lVRJ5chTBxE09FH/71k04=
2235-
gorm.io/driver/mysql v1.4.7 h1:rY46lkCspzGHn7+IYsNpSfEv9tA+SU4SkkB+GFX125Y=
2236-
gorm.io/driver/mysql v1.4.7/go.mod h1:SxzItlnT1cb6e1e4ZRpgJN2VYtcqJgqnHxWr4wsP8oc=
22372226
gorm.io/driver/postgres v1.5.2 h1:ytTDxxEv+MplXOfFe3Lzm7SjG09fcdb3Z/c056DTBx0=
22382227
gorm.io/driver/postgres v1.5.2/go.mod h1:fmpX0m2I1PKuR7mKZiEluwrP3hbs+ps7JIGMUBpCgl8=
2239-
gorm.io/driver/sqlite v1.4.3 h1:HBBcZSDnWi5BW3B3rwvVTc510KGkBkexlOg0QrmLUuU=
2240-
gorm.io/driver/sqlserver v1.4.1 h1:t4r4r6Jam5E6ejqP7N82qAJIJAht27EGT41HyPfXRw0=
2241-
gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
22422228
gorm.io/gorm v1.25.4 h1:iyNd8fNAe8W9dvtlgeRI5zSVZPsq3OpcTu37cYcpCmw=
22432229
gorm.io/gorm v1.25.4/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
22442230
gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo=

0 commit comments

Comments
 (0)