Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit37f04bd

Browse files
committed
feat: add terminal links
1 parente40c683 commit37f04bd

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

‎site/src/components/Resources/Resources.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import TableHead from "@material-ui/core/TableHead"
66
importTableRowfrom"@material-ui/core/TableRow"
77
importuseThemefrom"@material-ui/styles/useTheme"
88
importReactfrom"react"
9-
import{WorkspaceResource}from"../../api/typesGenerated"
9+
import{Workspace,WorkspaceResource}from"../../api/typesGenerated"
1010
import{getDisplayAgentStatus}from"../../util/workspace"
1111
import{TableHeaderRow}from"../TableHeaders/TableHeaders"
12+
import{TerminalLink}from"../TerminalLink/TerminalLink"
1213
import{WorkspaceSection}from"../WorkspaceSection/WorkspaceSection"
1314

1415
constLanguage={
@@ -17,14 +18,16 @@ const Language = {
1718
agentsLabel:"Agents",
1819
agentLabel:"Agent",
1920
statusLabel:"Status",
21+
accessLabel:"Access",
2022
}
2123

2224
interfaceResourcesProps{
2325
resources?:WorkspaceResource[]
2426
getResourcesError?:Error
27+
workspace:Workspace
2528
}
2629

27-
exportconstResources:React.FC<ResourcesProps>=({ resources, getResourcesError})=>{
30+
exportconstResources:React.FC<ResourcesProps>=({ resources, getResourcesError, workspace})=>{
2831
conststyles=useStyles()
2932
consttheme:Theme=useTheme()
3033

@@ -39,6 +42,7 @@ export const Resources: React.FC<ResourcesProps> = ({ resources, getResourcesErr
3942
<TableCell>{Language.resourceLabel}</TableCell>
4043
<TableCellclassName={styles.agentColumn}>{Language.agentLabel}</TableCell>
4144
<TableCell>{Language.statusLabel}</TableCell>
45+
<TableCell>{Language.accessLabel}</TableCell>
4246
</TableHeaderRow>
4347
</TableHead>
4448
<TableBody>
@@ -55,7 +59,7 @@ export const Resources: React.FC<ResourcesProps> = ({ resources, getResourcesErr
5559
return(
5660
<TableRow>
5761
<TableCellclassName={styles.resourceNameCell}>{resource.name}</TableCell>
58-
<TableCellcolSpan={2}></TableCell>
62+
<TableCellcolSpan={3}></TableCell>
5963
</TableRow>
6064
)
6165
}
@@ -78,6 +82,9 @@ export const Resources: React.FC<ResourcesProps> = ({ resources, getResourcesErr
7882
{getDisplayAgentStatus(theme,agent).status}
7983
</span>
8084
</TableCell>
85+
<TableCellclassName={styles.agentColumn}>
86+
<TerminalLinkworkspaceName={workspace.name}agentName={agent.name}userName={workspace.owner_name}/>
87+
</TableCell>
8188
</TableRow>
8289
)
8390
})

‎site/src/components/Workspace/Workspace.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const Workspace: React.FC<WorkspaceProps> = ({
6666

6767
<Stackspacing={3}>
6868
<WorkspaceStatsworkspace={workspace}/>
69-
<Resourcesresources={resources}getResourcesError={getResourcesError}/>
69+
<Resourcesresources={resources}getResourcesError={getResourcesError}workspace={workspace}/>
7070
<WorkspaceSectiontitle="Timeline"contentsProps={{className:styles.timelineContents}}>
7171
<BuildsTablebuilds={builds}className={styles.timelineTable}/>
7272
</WorkspaceSection>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp