File tree 1 file changed +14
-4
lines changed
site/src/components/TemplateResourcesTable
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import TableBody from "@material-ui/core/TableBody"
4
4
import TableCell from "@material-ui/core/TableCell"
5
5
import TableHead from "@material-ui/core/TableHead"
6
6
import TableRow from "@material-ui/core/TableRow"
7
+ import { AvatarData } from "components/AvatarData/AvatarData"
8
+ import { ResourceAvatar } from "components/Resources/ResourceAvatar"
7
9
import { FC } from "react"
8
10
import { WorkspaceResource } from "../../api/typesGenerated"
9
11
import { Stack } from "../Stack/Stack"
@@ -51,8 +53,12 @@ export const TemplateResourcesTable: FC<TemplateResourcesProps> = ({ resources }
51
53
return (
52
54
< TableRow >
53
55
< TableCell className = { styles . resourceNameCell } >
54
- { resource . name }
55
- < span className = { styles . resourceType } > { resource . type } </ span >
56
+ < AvatarData
57
+ title = { resource . name }
58
+ subtitle = { resource . type }
59
+ highlightTitle
60
+ avatar = { < ResourceAvatar type = { resource . type } /> }
61
+ />
56
62
</ TableCell >
57
63
< TableCell colSpan = { 3 } > </ TableCell >
58
64
</ TableRow >
@@ -65,8 +71,12 @@ export const TemplateResourcesTable: FC<TemplateResourcesProps> = ({ resources }
65
71
{ /* The rowspan should be the same than the number of agents */ }
66
72
{ agentIndex === 0 && (
67
73
< TableCell className = { styles . resourceNameCell } rowSpan = { agents . length } >
68
- { resource . name }
69
- < span className = { styles . resourceType } > { resource . type } </ span >
74
+ < AvatarData
75
+ title = { resource . name }
76
+ subtitle = { resource . type }
77
+ highlightTitle
78
+ avatar = { < ResourceAvatar type = { resource . type } /> }
79
+ />
70
80
</ TableCell >
71
81
) }
72
82
You can’t perform that action at this time.
0 commit comments