Browse Source

[Fix][UI Next][V1.0.0-Alpha] Remove the timeout settings switch in HTTP. (#9149)

3.0.0/version-upgrade
Amy0104 2 years ago committed by GitHub
parent
commit
0868a81061
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-http.ts
  2. 6
      dolphinscheduler-ui-next/src/views/projects/task/components/node/format-data.ts
  3. 1
      dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-http.ts

11
dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-http.ts

@ -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
},

6
dolphinscheduler-ui-next/src/views/projects/task/components/node/format-data.ts

@ -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
}

1
dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-http.ts

@ -48,7 +48,6 @@ export function useHttp({
httpParams: [],
url: '',
condition: '',
timeoutSetting: false,
connectTimeout: 60000,
socketTimeout: 60000
} as INodeData)

Loading…
Cancel
Save