@@ -3,6 +3,7 @@ import { Story } from "@storybook/react"
3
3
import { MockWorkspace , MockWorkspaceResource } from "testHelpers/entities"
4
4
import { AgentRow } from "./AgentRow"
5
5
import { ResourceCard , ResourceCardProps } from "./ResourceCard"
6
+ import { ProxyContext , getURLs } from "contexts/ProxyContext"
6
7
7
8
export default {
8
9
title : "components/ResourceCard" ,
@@ -15,15 +16,24 @@ export const Example = Template.bind({})
15
16
Example . args = {
16
17
resource : MockWorkspaceResource ,
17
18
agentRow : ( agent ) => (
18
- < AgentRow
19
- showApps
20
- key = { agent . id }
21
- agent = { agent }
22
- workspace = { MockWorkspace }
23
- applicationsHost = ""
24
- serverVersion = ""
25
- onUpdateAgent = { action ( "updateAgent" ) }
26
- />
19
+ < ProxyContext . Provider
20
+ value = { {
21
+ proxy : getURLs ( [ ] , undefined ) ,
22
+ isLoading : false ,
23
+ setProxy : ( ) => {
24
+ return
25
+ } ,
26
+ } }
27
+ >
28
+ < AgentRow
29
+ showApps
30
+ key = { agent . id }
31
+ agent = { agent }
32
+ workspace = { MockWorkspace }
33
+ serverVersion = ""
34
+ onUpdateAgent = { action ( "updateAgent" ) }
35
+ />
36
+ </ ProxyContext . Provider >
27
37
) ,
28
38
}
29
39
@@ -70,14 +80,23 @@ BunchOfMetadata.args = {
70
80
] ,
71
81
} ,
72
82
agentRow : ( agent ) => (
73
- < AgentRow
74
- showApps
75
- key = { agent . id }
76
- agent = { agent }
77
- workspace = { MockWorkspace }
78
- applicationsHost = ""
79
- serverVersion = ""
80
- onUpdateAgent = { action ( "updateAgent" ) }
81
- />
83
+ < ProxyContext . Provider
84
+ value = { {
85
+ proxy : getURLs ( [ ] , undefined ) ,
86
+ isLoading : false ,
87
+ setProxy : ( ) => {
88
+ return
89
+ } ,
90
+ } }
91
+ >
92
+ < AgentRow
93
+ showApps
94
+ key = { agent . id }
95
+ agent = { agent }
96
+ workspace = { MockWorkspace }
97
+ serverVersion = ""
98
+ onUpdateAgent = { action ( "updateAgent" ) }
99
+ />
100
+ </ ProxyContext . Provider >
82
101
) ,
83
102
}
0 commit comments