File tree Expand file tree Collapse file tree
lib/redux/slices/graphAddSlice Expand file tree Collapse file tree Original file line number Diff line number Diff 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 >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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.
Load Diff This file was deleted.
Original file line number Diff line number Diff 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 number Diff line number Diff line change 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;
Original file line number Diff line number Diff line change 11package models
22
3- import (
4- "gorm.io/datatypes"
5- )
6-
73type 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}
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments