@@ -162,7 +162,7 @@ function ScenarioForwardImpl({defaultActiveKey, defaultSecrets}) {
162
162
} , [ configs , setConfigs ] ) ;
163
163
164
164
// Update the forward config to server.
165
- const updateSecrets = React . useCallback ( ( e , action , platform , server , secret , enabled , custom , label , onSuccess ) => {
165
+ const updateSecrets = React . useCallback ( ( e , action , platform , stream , server , secret , enabled , custom , label , onSuccess ) => {
166
166
e . preventDefault ( ) ;
167
167
if ( ! server ) return alert ( t ( 'plat.com.addr' ) ) ;
168
168
if ( custom && ! label ) return alert ( t ( 'plat.com.label' ) ) ;
@@ -171,7 +171,7 @@ function ScenarioForwardImpl({defaultActiveKey, defaultSecrets}) {
171
171
setSubmiting ( true ) ;
172
172
173
173
axios . post ( '/terraform/v1/ffmpeg/forward/secret' , {
174
- action, platform, server, secret, enabled : ! ! enabled , custom : ! ! custom , label,
174
+ action, platform, stream , server, secret, enabled : ! ! enabled , custom : ! ! custom , label,
175
175
} , {
176
176
headers : Token . loadBearerHeader ( ) ,
177
177
} ) . then ( res => {
@@ -235,6 +235,11 @@ function ScenarioForwardImpl({defaultActiveKey, defaultSecrets}) {
235
235
< Form . Text > * { conf . custom ? `(${ t ( 'helper.required' ) } )` : `(${ t ( 'helper.optional' ) } )` } { t ( 'plat.com.name2' ) } </ Form . Text >
236
236
< Form . Control as = "input" defaultValue = { conf . label } onChange = { ( e ) => updateConfigObject ( { ...conf , label : e . target . value } ) } />
237
237
</ Form . Group >
238
+ < Form . Group className = "mb-3" >
239
+ < Form . Label > { t ( 'plat.com.source' ) } </ Form . Label >
240
+ { ! conf . custom && < Form . Text > * { t ( 'plat.com.source' ) } check System-{ '>' } Streams tab</ Form . Text > }
241
+ < Form . Control as = "input" defaultValue = { conf . stream } onChange = { ( e ) => updateConfigObject ( { ...conf , stream : e . target . value } ) } />
242
+ </ Form . Group >
238
243
< Form . Group className = "mb-3" >
239
244
< Form . Label > { conf . custom ? t ( 'plat.com.server' ) : t ( 'plat.com.server2' ) } </ Form . Label >
240
245
{ ! conf . custom && < Form . Text > * { t ( 'plat.com.server3' ) } < a href = { conf ?. locale ?. link } target = '_blank' rel = 'noreferrer' > { conf ?. locale ?. link2 } </ a > , { t ( 'plat.com.server4' ) } </ Form . Text > }
@@ -259,7 +264,7 @@ function ScenarioForwardImpl({defaultActiveKey, defaultSecrets}) {
259
264
type = "submit"
260
265
disabled = { submiting }
261
266
onClick = { ( e ) => {
262
- updateSecrets ( e , 'update' , conf . platform , conf . server , conf . secret , ! conf . enabled , conf . custom , conf . label , ( ) => {
267
+ updateSecrets ( e , 'update' , conf . platform , conf . stream , conf . server , conf . secret , ! conf . enabled , conf . custom , conf . label , ( ) => {
263
268
updateConfigObject ( { ...conf , enabled : ! conf . enabled } ) ;
264
269
} ) ;
265
270
} }
0 commit comments