-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sub-sections into NavDrawer (#30)
* - add sub-sections into NavDrawer * - update deps of NavDrawer memo * - address PR comments
- Loading branch information
1 parent
efe7cb3
commit 01d3203
Showing
21 changed files
with
221 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,52 @@ | ||
package models | ||
|
||
import ( | ||
"database/sql/driver" | ||
"encoding/json" | ||
"errors" | ||
) | ||
|
||
type Application struct { | ||
Id Id `json:"id"` | ||
Name string `json:"name"` | ||
Description string `json:"description"` | ||
Href string `json:"href"` | ||
IconName string `json:"icon" gorm:"column:icon"` | ||
UseProjects bool `json:"use_projects"` | ||
IsInBeta bool `json:"is_in_beta"` | ||
IsDisabled bool `json:"is_disabled"` | ||
Id Id `json:"id"` | ||
Name string `json:"name"` | ||
Description string `json:"description"` | ||
Href string `json:"href"` | ||
IconName string `json:"icon" gorm:"column:icon"` | ||
UseProjects bool `json:"use_projects"` | ||
IsInBeta bool `json:"is_in_beta"` | ||
IsDisabled bool `json:"is_disabled"` | ||
Config *ApplicationConfig `json:"config"` | ||
} | ||
|
||
type ApplicationConfig struct { | ||
Sections []ApplicationSection `json:"sections"` | ||
} | ||
|
||
func (c ApplicationConfig) Value() (driver.Value, error) { | ||
return json.Marshal(c) | ||
} | ||
|
||
func (c *ApplicationConfig) Scan(value interface{}) error { | ||
b, ok := value.([]byte) | ||
if !ok { | ||
return errors.New("type assertion to []byte failed") | ||
} | ||
return json.Unmarshal(b, &c) | ||
} | ||
|
||
type ApplicationSection struct { | ||
Name string `json:"name"` | ||
Href string `json:"href"` | ||
} | ||
|
||
func (c ApplicationSection) Value() (driver.Value, error) { | ||
return json.Marshal(c) | ||
} | ||
|
||
func (c *ApplicationSection) Scan(value interface{}) error { | ||
b, ok := value.([]byte) | ||
if !ok { | ||
return errors.New("type assertion to []byte failed") | ||
} | ||
return json.Unmarshal(b, &c) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE applications DROP COLUMN config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ALTER TABLE applications ADD config jsonb; | ||
|
||
UPDATE applications | ||
SET config = '{"sections": [{"name": "Routers", "href": "/routers"}, {"name": "Ensemblers", "href": "/ensemblers"}, {"name": "Ensembling Jobs", "href": "/jobs"}]}' | ||
WHERE name = 'Turing'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
ui/packages/app/src/pages/project/components/ComingSoonPanel.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
ui/packages/lib/src/components/collapsible_labels_panels/CollapsibleLabelsPanel.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.