|
|
|
|
@ -5,6 +5,7 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<NcSelect :value="currentValue"
|
|
|
|
|
v-model="newValue"
|
|
|
|
|
:placeholder="t('workflowengine', 'Select a request URL')"
|
|
|
|
|
label="label"
|
|
|
|
|
:clearable="false"
|
|
|
|
|
@ -45,6 +46,9 @@ export default {
|
|
|
|
|
mixins: [
|
|
|
|
|
valueMixin,
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
emits: ['update:model-value'],
|
|
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
newValue: '',
|
|
|
|
|
@ -57,12 +61,22 @@ export default {
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
|
modelValue: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: '',
|
|
|
|
|
},
|
|
|
|
|
operator: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: '',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
options() {
|
|
|
|
|
return [...this.predefinedTypes, this.customValue]
|
|
|
|
|
},
|
|
|
|
|
placeholder() {
|
|
|
|
|
if (this.check.operator === 'matches' || this.check.operator === '!matches') {
|
|
|
|
|
if (this.operator === 'matches' || this.operator === '!matches') {
|
|
|
|
|
return '/^https\\:\\/\\/localhost\\/index\\.php$/i'
|
|
|
|
|
}
|
|
|
|
|
return 'https://localhost/index.php'
|
|
|
|
|
@ -102,12 +116,12 @@ export default {
|
|
|
|
|
// TODO: check if value requires a regex and set the check operator according to that
|
|
|
|
|
if (value !== null) {
|
|
|
|
|
this.newValue = value.id
|
|
|
|
|
this.$emit('input', this.newValue)
|
|
|
|
|
this.$emit('update:model-value', this.newValue)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
updateCustom(event) {
|
|
|
|
|
this.newValue = event.target.value
|
|
|
|
|
this.$emit('input', this.newValue)
|
|
|
|
|
this.$emit('update:model-value', this.newValue)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|