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

Commit6af8f6c

Browse files
committed
make fmt lint
1 parent8d86e8d commit6af8f6c

File tree

4 files changed

+49
-47
lines changed

4 files changed

+49
-47
lines changed

‎coderd/workspaceagents_test.go‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,10 +1173,12 @@ func TestWorkspaceAgentContainers(t *testing.T) {
11731173
Labels:testLabels,
11741174
Running:true,
11751175
Status:"running",
1176-
Ports: []codersdk.WorkspaceAgentListeningPort{
1176+
Ports: []codersdk.WorkspaceAgentDevcontainerPort{
11771177
{
1178-
Network:"tcp",
1179-
Port:80,
1178+
Network:"tcp",
1179+
Port:80,
1180+
HostIP:"0.0.0.0",
1181+
HostPort:8000,
11801182
},
11811183
},
11821184
Volumes:map[string]string{

‎site/src/modules/resources/AgentDevcontainerCard.stories.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
importtype{Meta,StoryObj}from"@storybook/react";
2-
import{AgentDevcontainerCard}from"./AgentDevcontainerCard";
32
import{
43
MockWorkspace,
54
MockWorkspaceAgentDevcontainer,
65
MockWorkspaceAgentDevcontainerPorts,
76
}from"testHelpers/entities";
7+
import{AgentDevcontainerCard}from"./AgentDevcontainerCard";
88

99
constmeta:Meta<typeofAgentDevcontainerCard>={
1010
title:"modules/resources/AgentDevcontainerCard",

‎site/src/modules/resources/AgentDevcontainerCard.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
importLinkfrom"@mui/material/Link";
2+
importTooltip,{typeTooltipProps}from"@mui/material/Tooltip";
23
importtype{
34
Workspace,
45
WorkspaceAgentDevcontainer,
@@ -10,7 +11,6 @@ import { portForwardURL } from "utils/portForward";
1011
import{AgentButton}from"./AgentButton";
1112
import{AgentDevcontainerSSHButton}from"./SSHButton/SSHButton";
1213
import{TerminalLink}from"./TerminalLink/TerminalLink";
13-
importTooltip,{typeTooltipProps}from"@mui/material/Tooltip";
1414

1515
typeAgentDevcontainerCardProps={
1616
container:WorkspaceAgentDevcontainer;
@@ -52,13 +52,13 @@ export const AgentDevcontainerCard: FC<AgentDevcontainerCardProps> = ({
5252
/>
5353
{wildcardHostname!==""&&
5454
container.ports.map((port)=>{
55-
letportLabel=`${port.port}/${port.network.toUpperCase()}`;
56-
lethasHostBind=
55+
constportLabel=`${port.port}/${port.network.toUpperCase()}`;
56+
consthasHostBind=
5757
port.host_port!==undefined&&
5858
port.host_port!==null&&
5959
port.host_ip!==undefined&&
6060
port.host_ip!==null;
61-
lethelperText=hasHostBind
61+
consthelperText=hasHostBind
6262
?`${port.host_ip}:${port.host_port}`
6363
:"Not bound to host";
6464
return(

‎site/src/testHelpers/entities.ts‎

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4244,45 +4244,45 @@ export const MockNotificationTemplates: TypesGen.NotificationTemplate[] = [
42444244
exportconstMockNotificationMethodsResponse:TypesGen.NotificationMethodsResponse=
42454245
{available:["smtp","webhook"],default:"smtp"};
42464246

4247-
exportconstMockWorkspaceAgentDevcontainerPorts:TypesGen.WorkspaceAgentDevcontainerPort[]=[
4248-
{
4249-
port:1000,
4250-
network:"tcp",
4251-
host_port:1000,
4252-
host_ip:"0.0.0.0"
4253-
},
4254-
{
4255-
port:2001,
4256-
network:"tcp",
4257-
host_port:2000,
4258-
host_ip:"::1"
4259-
},
4247+
exportconstMockWorkspaceAgentDevcontainerPorts:TypesGen.WorkspaceAgentDevcontainerPort[]=
4248+
[
4249+
{
4250+
port:1000,
4251+
network:"tcp",
4252+
host_port:1000,
4253+
host_ip:"0.0.0.0",
4254+
},
4255+
{
4256+
port:2001,
4257+
network:"tcp",
4258+
host_port:2000,
4259+
host_ip:"::1",
4260+
},
4261+
{
4262+
port:8888,
4263+
network:"tcp",
4264+
},
4265+
];
4266+
4267+
exportconstMockWorkspaceAgentDevcontainer:TypesGen.WorkspaceAgentDevcontainer=
42604268
{
4261-
port:8888,
4262-
network:"tcp",
4263-
}
4264-
]
4265-
4266-
exportconstMockWorkspaceAgentDevcontainer :TypesGen.WorkspaceAgentDevcontainer={
4267-
created_at:"2024-01-04T15:53:03.21563Z",
4268-
id:"abcd1234",
4269-
name:"container-1",
4270-
image:"ubuntu:latest",
4271-
labels:{
4272-
"foo":"bar"
4273-
},
4274-
ports:[],
4275-
running:true,
4276-
status:"running",
4277-
volumes:{
4278-
"/mnt/volume1":"/volume1",
4279-
}
4280-
}
4269+
created_at:"2024-01-04T15:53:03.21563Z",
4270+
id:"abcd1234",
4271+
name:"container-1",
4272+
image:"ubuntu:latest",
4273+
labels:{
4274+
foo:"bar",
4275+
},
4276+
ports:[],
4277+
running:true,
4278+
status:"running",
4279+
volumes:{
4280+
"/mnt/volume1":"/volume1",
4281+
},
4282+
};
42814283

42824284
exportconstMockWorkspaceAgentListContainersResponse:TypesGen.WorkspaceAgentListContainersResponse=
4283-
{
4284-
containers:[
4285-
MockWorkspaceAgentDevcontainer,
4286-
],
4287-
"warnings":["This is a warning"],
4288-
}
4285+
{
4286+
containers:[MockWorkspaceAgentDevcontainer],
4287+
warnings:["This is a warning"],
4288+
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp