-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: View templates from WebUI #9304
Conversation
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9304 +/- ##
==========================================
+ Coverage 44.24% 44.51% +0.26%
==========================================
Files 1275 1278 +3
Lines 156260 156655 +395
Branches 2450 2453 +3
==========================================
+ Hits 69145 69734 +589
+ Misses 86875 86678 -197
- Partials 240 243 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backend changes look good to me! Could add another test case for a little more coverage but that's not a show stopper.
@@ -150,7 +150,7 @@ func TestGetTemplates(t *testing.T) { | |||
|
|||
t.Run("GetTemplates filter by workspace", func(t *testing.T) { | |||
resp, err := api.GetTemplates(ctx, &apiv1.GetTemplatesRequest{ | |||
WorkspaceId: workspaceIDs[0], | |||
WorkspaceIds: []int32{workspaceIDs[0]}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth unit testing with multiple workspace IDs? Is it possible one workspace ID could be invalid? (I wouldn't think so ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title: '', | ||
width: DEFAULT_COLUMN_WIDTHS['action'], | ||
}, | ||
] as ColumnDef<Template>[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: would it work to have const columns: ColumnDef<Template>[]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isFiltered
fields are not compatible because we only take (s: unknown) => boolean
, but want to pass (s: Settings) => boolean
. I'm not sure why we only accept unknown
as parameter though...
if (!template || !workspaces) return null; | ||
|
||
return ( | ||
<Modal size="small" title={`Template ${template.name}`}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ticket
MD-382
Description
View templates table at templates page, and workspace detail template tab.
Test Plan
With
Manage Templates
feature flag on.Navigate to Templates page from sidebar to see a list of templates
Sort, filter, search should work as expected.
Click on action dots to view the content of templates.
Navigate to workspace details page -> template tab
Workspace is no longer filterable, sort and filter by name should work as expected
Checklist
docs/release-notes/
.See Release Note for details.