@ -15,15 +15,34 @@
limitations under the License.
limitations under the License.
-->
-->
< section [ formGroup ] = " restApiCallConfigForm " class = "flex flex-col" >
< section [ formGroup ] = " restApiCallConfigForm " class = "flex flex-col gap-4" >
< mat-form-field class = "mat-block" subscriptSizing = "dynamic" >
< div class = "tb-form-panel stroked" >
< mat-label translate > rule-node-config.endpoint-url-pattern< / mat-label >
< div class = "tb-form-panel-title" > Request URL< / div >
< input required matInput formControlName = "restEndpointUrlPattern" >
< mat-form-field class = "mat-block" subscriptSizing = "dynamic" >
< mat-error * ngIf = "restApiCallConfigForm.get('restEndpointUrlPattern').hasError('required')" >
< mat-label translate > rule-node-config.endpoint-url-pattern< / mat-label >
{{ 'rule-node-config.endpoint-url-pattern-required' | translate }}
< input required matInput formControlName = "restEndpointUrlPattern" >
< / mat-error >
< mat-error * ngIf = "restApiCallConfigForm.get('restEndpointUrlPattern').hasError('required')" >
< mat-hint translate > rule-node-config.general-pattern-hint< / mat-hint >
{{ 'rule-node-config.endpoint-url-pattern-required' | translate }}
< / mat-form-field >
< / mat-error >
< mat-hint translate > rule-node-config.url-hint< / mat-hint >
< / mat-form-field >
< mat-expansion-panel class = "tb-settings tb-form-panel stroked no-gap" [ expanded ] = " isQueryParamsExpanded " >
< mat-expansion-panel-header >
{{ 'rule-node-config.query-params' | translate }}
< div [ tb-hint-tooltip-icon ] = " ' rule-node-config . query-params-hint ' | translate " tooltipPosition = "above" > < / div >
< / mat-expansion-panel-header >
< ng-template matExpansionPanelContent >
< tb-kv-map-config-old
formControlName="queryParams"
keyText="rule-node-config.query-params-name"
keyRequiredText="rule-node-config.query-params-name-required"
valText="rule-node-config.query-params-value"
valRequiredText="rule-node-config.query-params-value-required"
emptyText="rule-node-config.query-params-empty">>
< / tb-kv-map-config-old >
< / ng-template >
< / mat-expansion-panel >
< / div >
< mat-form-field class = "mat-block" >
< mat-form-field class = "mat-block" >
< mat-label translate > rule-node-config.request-method< / mat-label >
< mat-label translate > rule-node-config.request-method< / mat-label >
< mat-select formControlName = "requestMethod" >
< mat-select formControlName = "requestMethod" >
@ -32,99 +51,113 @@
< / mat-option >
< / mat-option >
< / mat-select >
< / mat-select >
< / mat-form-field >
< / mat-form-field >
< mat-checkbox formControlName = "enableProxy" >
< div class = "tb-form-panel stroked" >
{{ 'rule-node-config.enable-proxy' | translate }}
< mat-expansion-panel class = "tb-settings" [ expanded ] = " isHeadersExpanded " >
< / mat-checkbox >
< mat-expansion-panel-header >
< mat-checkbox * ngIf = "!restApiCallConfigForm.get('enableProxy').value" formControlName = "useSimpleClientHttpFactory" >
{{ 'rule-node-config.headers' | translate }}
{{ 'rule-node-config.use-simple-client-http-factory' | translate }}
< / mat-expansion-panel-header >
< / mat-checkbox >
< ng-template matExpansionPanelContent >
< mat-checkbox formControlName = "parseToPlainText" >
< tb-kv-map-config-old
{{ 'rule-node-config.parse-to-plain-text' | translate }}
formControlName="headers"
< / mat-checkbox >
keyText="rule-node-config.header"
< div class = "tb-hint" style = "padding-bottom: 5px;" translate > rule-node-config.parse-to-plain-text-hint< / div >
keyRequiredText="rule-node-config.header-required"
< mat-checkbox formControlName = "ignoreRequestBody" >
valText="rule-node-config.value"
{{ 'rule-node-config.ignore-request-body' | translate }}
valRequiredText="rule-node-config.value-required"
< / mat-checkbox >
description="rule-node-config.headers-hint"
< div * ngIf = "restApiCallConfigForm.get('enableProxy').value" >
emptyText="rule-node-config.headers-empty">
< mat-checkbox formControlName = "useSystemProxyProperties" >
< / tb-kv-map-config-old >
{{ 'rule-node-config.use-system-proxy-properties' | translate }}
< / ng-template >
< / mat-checkbox >
< / mat-expansion-panel >
< div * ngIf = "!restApiCallConfigForm.get('useSystemProxyProperties').value" >
< / div >
< div class = "gt-sm:flex gt-sm:flex-row gt-sm:gap-2" >
< tb-credentials-config formControlName = "credentials" > < / tb-credentials-config >
< mat-form-field class = "mat-block gt-sm:max-w-10% gt-sm:flex-full" >
< div class = "tb-form-panel stroked" >
< mat-label translate > rule-node-config.proxy-scheme< / mat-label >
< mat-expansion-panel class = "tb-settings" >
< mat-select formControlName = "proxyScheme" >
< mat-expansion-panel-header >
< mat-option * ngFor = "let proxyScheme of proxySchemes" [ value ] = " proxyScheme " >
{{ 'rule-node-config.advanced-settings' | translate }}
{{ proxyScheme }}
< / mat-expansion-panel-header >
< / mat-option >
< ng-template matExpansionPanelContent >
< / mat-select >
< div class = "tb-form-panel stroked column" >
< / mat-form-field >
< mat-slide-toggle class = "mat-slide fixed-title-width" formControlName = "enableProxy" >
< mat-form-field class = "md-block gt-sm:max-w-50% gt-sm:flex-full" >
{{ 'rule-node-config.enable-proxy' | translate }}
< mat-label translate > rule-node-config.proxy-host< / mat-label >
< / mat-slide-toggle >
< input matInput required formControlName = "proxyHost" >
< div * ngIf = "restApiCallConfigForm.get('enableProxy').value" class = "flex flex-col gap-4" >
< mat-error * ngIf = "restApiCallConfigForm.get('proxyHost').hasError('required')" >
< mat-slide-toggle class = "mat-slide fixed-title-width" formControlName = "useSystemProxyProperties" >
{{ 'rule-node-config.proxy-host-required' | translate }}
{{ 'rule-node-config.use-system-proxy-properties' | translate }}
< / mat-slide-toggle >
< div * ngIf = "!restApiCallConfigForm.get('useSystemProxyProperties').value" >
< div class = "gt-sm:flex gt-sm:flex-row gt-sm:gap-2" >
< mat-form-field class = "md-block gt-sm:max-w-50% gt-sm:flex-full" >
< mat-label translate > rule-node-config.proxy-host< / mat-label >
< input matInput required formControlName = "proxyHost" >
< mat-error * ngIf = "restApiCallConfigForm.get('proxyHost').hasError('required')" >
{{ 'rule-node-config.proxy-host-required' | translate }}
< / mat-error >
< / mat-form-field >
< mat-form-field class = "mat-block gt-sm:max-w-50% gt-sm:flex-full" >
< mat-label translate > rule-node-config.proxy-port< / mat-label >
< input matInput required formControlName = "proxyPort" type = "number" step = "1" >
< mat-error * ngIf = "restApiCallConfigForm.get('proxyPort').hasError('required')" >
{{ 'rule-node-config.proxy-port-required' | translate }}
< / mat-error >
< mat-error
*ngIf="restApiCallConfigForm.get('proxyPort').hasError('min') || restApiCallConfigForm.get('proxyPort').hasError('max')">
{{ 'rule-node-config.proxy-port-range' | translate }}
< / mat-error >
< / mat-form-field >
< / div >
< mat-form-field class = "mat-block" >
< mat-label translate > rule-node-config.proxy-user< / mat-label >
< input matInput formControlName = "proxyUser" >
< / mat-form-field >
< mat-form-field class = "mat-block" >
< mat-label translate > rule-node-config.proxy-password< / mat-label >
< input matInput type = "password" formControlName = "proxyPassword" >
< tb-toggle-password matSuffix > < / tb-toggle-password >
< / mat-form-field >
< / div >
< / div >
< / div >
< div class = "tb-form-row" >
< mat-slide-toggle class = "mat-slide fixed-title-width" formControlName = "parseToPlainText" >
< div [ tb-hint-tooltip-icon ] = " ' rule-node-config . parse-to-plain-text-hint ' | translate " tooltipPosition = "above" >
{{ 'rule-node-config.parse-to-plain-text' | translate }}
< / div >
< / mat-slide-toggle >
< / div >
< div class = "tb-form-row" >
< mat-slide-toggle class = "mat-slide fixed-title-width" formControlName = "ignoreRequestBody" >
{{ 'rule-node-config.ignore-request-body' | translate }}
< / mat-slide-toggle >
< / div >
< mat-form-field * ngIf = "restApiCallConfigForm.get('enableProxy').value" class = "mat-block"
subscriptSizing="dynamic">
< mat-label translate > rule-node-config.read-timeout< / mat-label >
< input type = "text" min = "0" [ max ] = " IntLimit " inputmode = "numeric" pattern = "[0-9]*" matInput formControlName = "readTimeoutMs" >
< mat-hint translate > rule-node-config.read-timeout-hint< / mat-hint >
< mat-error
*ngIf="restApiCallConfigForm.get('readTimeoutMs').hasError('max')">
{{ 'rule-node-config.int-range' | translate }}
< / mat-error >
< / mat-error >
< / mat-form-field >
< / mat-form-field >
< mat-form-field class = "mat-block gt-sm:max-w-40% gt-sm:flex-full" >
< mat-form-field class = "mat-block" subscriptSizing = "dynamic" >
< mat-label translate > rule-node-config.proxy-port< / mat-label >
< mat-label translate > rule-node-config.max-parallel-requests-count< / mat-label >
< input matInput required formControlName = "proxyPort" type = "number" step = "1" >
< input type = "text" min = "0" [ max ] = " IntLimit " inputmode = "numeric" pattern = "[0-9]*" matInput formControlName = "maxParallelRequestsCount" >
< mat-error * ngIf = "restApiCallConfigForm.get('proxyPort').hasError('required')" >
< mat-hint translate > rule-node-config.max-parallel-requests-count-hint< / mat-hint >
{{ 'rule-node-config.proxy-port-required' | translate }}
< mat-error
*ngIf="restApiCallConfigForm.get('maxParallelRequestsCount').hasError('max')">
{{ 'rule-node-config.int-range' | translate }}
< / mat-error >
< / mat-error >
< / mat-form-field >
< mat-form-field class = "mat-block" subscriptSizing = "dynamic" >
< mat-label translate > rule-node-config.max-response-size< / mat-label >
< input type = "text" min = "1" [ max ] = " MemoryBufferSizeInKbLimit " inputmode = "numeric" pattern = "[0-9]*" matInput formControlName = "maxInMemoryBufferSizeInKb" >
< mat-hint translate > rule-node-config.max-response-size-hint< / mat-hint >
< mat-error
< mat-error
*ngIf="restApiCallConfigForm.get('proxyPort').hasError('min') || restApiCallConfigForm.get('proxyPort').hasError('max')">
*ngIf="restApiCallConfigForm.get('maxInMemoryBufferSizeInKb').hasError('min') || restApiCallConfigForm.get('maxInMemoryBufferSizeInKb ').hasError('max')">
{{ 'rule-node-config.proxy-port-range' | translate }}
{{ 'rule-node-config.memory-buffer-size-range' | translate: { max: MemoryBufferSizeInKbLimit } }}
< / mat-error >
< / mat-error >
< / mat-form-field >
< / mat-form-field >
< / div >
< / ng-template >
< mat-form-field class = "mat-block" >
< / mat-expansion-panel >
< mat-label translate > rule-node-config.proxy-user< / mat-label >
< input matInput formControlName = "proxyUser" >
< / mat-form-field >
< mat-form-field class = "mat-block" >
< mat-label translate > rule-node-config.proxy-password< / mat-label >
< input matInput formControlName = "proxyPassword" >
< / mat-form-field >
< / div >
< / div >
< / div >
< mat-form-field * ngIf = "!restApiCallConfigForm.get('useSimpleClientHttpFactory').value || restApiCallConfigForm.get('enableProxy').value" class = "mat-block"
subscriptSizing="dynamic">
< mat-label translate > rule-node-config.read-timeout< / mat-label >
< input type = "text" min = "0" [ max ] = " IntLimit " inputmode = "numeric" pattern = "[0-9]*" matInput formControlName = "readTimeoutMs" >
< mat-hint translate > rule-node-config.read-timeout-hint< / mat-hint >
< mat-error
*ngIf="restApiCallConfigForm.get('readTimeoutMs').hasError('max')">
{{ 'rule-node-config.int-range' | translate }}
< / mat-error >
< / mat-form-field >
< mat-form-field class = "mat-block" subscriptSizing = "dynamic" >
< mat-label translate > rule-node-config.max-parallel-requests-count< / mat-label >
< input type = "text" min = "0" [ max ] = " IntLimit " inputmode = "numeric" pattern = "[0-9]*" matInput formControlName = "maxParallelRequestsCount" >
< mat-hint translate > rule-node-config.max-parallel-requests-count-hint< / mat-hint >
< mat-error
*ngIf="restApiCallConfigForm.get('maxParallelRequestsCount').hasError('max')">
{{ 'rule-node-config.int-range' | translate }}
< / mat-error >
< / mat-form-field >
< mat-form-field class = "mat-block" subscriptSizing = "dynamic" >
< mat-label translate > rule-node-config.max-response-size< / mat-label >
< input type = "text" min = "1" [ max ] = " MemoryBufferSizeInKbLimit " inputmode = "numeric" pattern = "[0-9]*" matInput formControlName = "maxInMemoryBufferSizeInKb" >
< mat-hint translate > rule-node-config.max-response-size-hint< / mat-hint >
< mat-error
*ngIf="restApiCallConfigForm.get('maxInMemoryBufferSizeInKb').hasError('min') || restApiCallConfigForm.get('maxInMemoryBufferSizeInKb').hasError('max')">
{{ 'rule-node-config.memory-buffer-size-range' | translate: { max: MemoryBufferSizeInKbLimit } }}
< / mat-error >
< / mat-form-field >
< label translate class = "tb-title" > rule-node-config.headers< / label >
< div class = "tb-hint" [ innerHTML ] = " ' rule-node-config . headers-hint ' | translate | safe: ' html ' " > < / div >
< tb-kv-map-config-old
required="false"
formControlName="headers"
keyText="rule-node-config.header"
keyRequiredText="rule-node-config.header-required"
valText="rule-node-config.value"
valRequiredText="rule-node-config.value-required">
< / tb-kv-map-config-old >
< tb-credentials-config formControlName = "credentials" [ disableCertPemCredentials ] = " restApiCallConfigForm . get ( ' useSimpleClientHttpFactory ' ) . value " > < / tb-credentials-config >
< / section >
< / section >