[Fix][UI Next][V1.0.0-Alpha] Remove the timeout settings switch in HTTP. (#9149)
parent
5289b09817
commit
0868a81061
|
|
@ -14,14 +14,12 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useCustomParams } from '.'
|
||||
import type { IJsonItem } from '../types'
|
||||
|
||||
export function useHttp(model: { [field: string]: any }): IJsonItem[] {
|
||||
const { t } = useI18n()
|
||||
const timeoutSpan = computed(() => (model.timeoutSetting ? 12 : 0))
|
||||
|
||||
const HTTP_CHECK_CONDITIONS = [
|
||||
{
|
||||
|
|
@ -140,16 +138,11 @@ export function useHttp(model: { [field: string]: any }): IJsonItem[] {
|
|||
placeholder: t('project.node.http_condition_tips')
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
field: 'timeoutSetting',
|
||||
name: t('project.node.timeout_settings')
|
||||
},
|
||||
{
|
||||
type: 'input-number',
|
||||
field: 'connectTimeout',
|
||||
name: t('project.node.connect_timeout'),
|
||||
span: timeoutSpan,
|
||||
span: 12,
|
||||
props: {
|
||||
max: Math.pow(7, 10) - 1
|
||||
},
|
||||
|
|
@ -172,7 +165,7 @@ export function useHttp(model: { [field: string]: any }): IJsonItem[] {
|
|||
type: 'input-number',
|
||||
field: 'socketTimeout',
|
||||
name: t('project.node.socket_timeout'),
|
||||
span: timeoutSpan,
|
||||
span: 12,
|
||||
props: {
|
||||
max: Math.pow(7, 10) - 1
|
||||
},
|
||||
|
|
|
|||
|
|
@ -368,12 +368,6 @@ export function formatModel(data: ITaskData) {
|
|||
(item: { id: number }) => item.id
|
||||
)
|
||||
}
|
||||
if (
|
||||
data.taskParams?.connectTimeout !== 60000 ||
|
||||
data.taskParams?.socketTimeout !== 60000
|
||||
) {
|
||||
params.timeoutSetting = true
|
||||
}
|
||||
if (data.taskParams?.mainJar) {
|
||||
params.mainJar = data.taskParams?.mainJar.id
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ export function useHttp({
|
|||
httpParams: [],
|
||||
url: '',
|
||||
condition: '',
|
||||
timeoutSetting: false,
|
||||
connectTimeout: 60000,
|
||||
socketTimeout: 60000
|
||||
} as INodeData)
|
||||
|
|
|
|||
Loading…
Reference in New Issue