|
|
@ -49,6 +49,12 @@ |
|
|
|
<x-input v-model="waitStartTimeout.interval" style="width: 100px;" :disabled="isDetails" maxlength="9"> |
|
|
|
<x-input v-model="waitStartTimeout.interval" style="width: 100px;" :disabled="isDetails" maxlength="9"> |
|
|
|
<span slot="append">{{$t('Minute')}}</span> |
|
|
|
<span slot="append">{{$t('Minute')}}</span> |
|
|
|
</x-input> |
|
|
|
</x-input> |
|
|
|
|
|
|
|
<span class="text-box"> |
|
|
|
|
|
|
|
<span>{{$t('Check interval')}}</span> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
<x-input v-model="waitStartTimeout.checkInterval" style="width: 100px;" :disabled="isDetails" maxlength="9"> |
|
|
|
|
|
|
|
<span slot="append">{{$t('Minute')}}</span> |
|
|
|
|
|
|
|
</x-input> |
|
|
|
<span class="text-box"> |
|
|
|
<span class="text-box"> |
|
|
|
<span>{{$t('Timeout strategy')}}</span> |
|
|
|
<span>{{$t('Timeout strategy')}}</span> |
|
|
|
</span> |
|
|
|
</span> |
|
|
@ -110,7 +116,8 @@ |
|
|
|
// Timeout strategy |
|
|
|
// Timeout strategy |
|
|
|
strategy: ['FAILED'], |
|
|
|
strategy: ['FAILED'], |
|
|
|
// Timeout period |
|
|
|
// Timeout period |
|
|
|
interval: null |
|
|
|
interval: null, |
|
|
|
|
|
|
|
checkInterval: null |
|
|
|
}, |
|
|
|
}, |
|
|
|
waitCompleteTimeout: { |
|
|
|
waitCompleteTimeout: { |
|
|
|
enable: false, |
|
|
|
enable: false, |
|
|
@ -131,6 +138,7 @@ |
|
|
|
// p = 0 for timeout switch; p = 1 for wait start timeout switch; p = 2 for wait complete timeout switch. |
|
|
|
// p = 0 for timeout switch; p = 1 for wait start timeout switch; p = 2 for wait complete timeout switch. |
|
|
|
if (p === 1 || p === 0) { |
|
|
|
if (p === 1 || p === 0) { |
|
|
|
this.waitStartTimeout.interval = is ? 30 : null |
|
|
|
this.waitStartTimeout.interval = is ? 30 : null |
|
|
|
|
|
|
|
this.waitStartTimeout.checkInterval = is ? 1 : null |
|
|
|
} |
|
|
|
} |
|
|
|
if (p === 2 || p === 0) { |
|
|
|
if (p === 2 || p === 0) { |
|
|
|
this.waitCompleteTimeout.strategy = is ? ['WARN'] : [] |
|
|
|
this.waitCompleteTimeout.strategy = is ? ['WARN'] : [] |
|
|
@ -149,7 +157,7 @@ |
|
|
|
const reg = /^[1-9]\d*$/ |
|
|
|
const reg = /^[1-9]\d*$/ |
|
|
|
if (this.enable |
|
|
|
if (this.enable |
|
|
|
&& (this.waitCompleteTimeout.enable && !reg.test(this.waitCompleteTimeout.interval)) |
|
|
|
&& (this.waitCompleteTimeout.enable && !reg.test(this.waitCompleteTimeout.interval)) |
|
|
|
|| (this.waitStartTimeout.enable && !reg.test(this.waitStartTimeout.interval))) { |
|
|
|
|| (this.waitStartTimeout.enable && (!reg.test(this.waitStartTimeout.interval || !reg.test(this.waitStartTimeout.checkInterval))))) { |
|
|
|
this.$message.warning(`${this.$t('Timeout must be a positive integer')}`) |
|
|
|
this.$message.warning(`${this.$t('Timeout must be a positive integer')}`) |
|
|
|
return false |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
@ -157,6 +165,7 @@ |
|
|
|
waitStartTimeout: { |
|
|
|
waitStartTimeout: { |
|
|
|
strategy: 'FAILED', |
|
|
|
strategy: 'FAILED', |
|
|
|
interval: parseInt(this.waitStartTimeout.interval), |
|
|
|
interval: parseInt(this.waitStartTimeout.interval), |
|
|
|
|
|
|
|
checkInterval: parseInt(this.waitStartTimeout.checkInterval), |
|
|
|
enable: this.waitStartTimeout.enable |
|
|
|
enable: this.waitStartTimeout.enable |
|
|
|
}, |
|
|
|
}, |
|
|
|
waitCompleteTimeout: { |
|
|
|
waitCompleteTimeout: { |
|
|
@ -193,6 +202,7 @@ |
|
|
|
this.waitStartTimeout.enable = o.waitStartTimeout.enable || false |
|
|
|
this.waitStartTimeout.enable = o.waitStartTimeout.enable || false |
|
|
|
this.waitStartTimeout.strategy = ['FAILED'] |
|
|
|
this.waitStartTimeout.strategy = ['FAILED'] |
|
|
|
this.waitStartTimeout.interval = o.waitStartTimeout.interval || null |
|
|
|
this.waitStartTimeout.interval = o.waitStartTimeout.interval || null |
|
|
|
|
|
|
|
this.waitStartTimeout.checkInterval = o.waitStartTimeout.checkInterval || null |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|