diff --git a/client/web/admin/src/components/Apigw/CFilterModal.vue b/client/web/admin/src/components/Apigw/CFilterModal.vue
index 20d6274c3..f4eef686a 100644
--- a/client/web/admin/src/components/Apigw/CFilterModal.vue
+++ b/client/web/admin/src/components/Apigw/CFilterModal.vue
@@ -11,17 +11,15 @@
@hidden="onHidden"
>
{{ $t('filters.enabled') }}
@@ -53,25 +51,65 @@ export default {
data () {
return {
- updated: false,
-
- filteredFields: [],
+ internalFilter: undefined,
}
},
+ watch: {
+ visible: {
+ handler (visible) {
+ if (visible) {
+ // Convert to FE structure
+ this.internalFilter = {
+ ...this.filter,
+ params: this.filter.params.map(p => {
+ if (this.filter.ref === 'response') {
+ let value = p.value || {}
+
+ if (p.type === 'header') {
+ value = Object.entries(value).map(([name, v = []]) => {
+ return { name, expr: v.join('') }
+ })
+ } else if (p.type === 'input') {
+ value = { type: 'Any', expr: '', ...value }
+ }
+
+ this.$set(p, 'value', value)
+ }
+
+ return p
+ }),
+ }
+ }
+ },
+ },
+ },
+
methods: {
onSave () {
- this.$emit('submit', { ...this.filter, updated: this.updated })
- this.updated = false
+ // Convert to BE structure
+ const filter = {
+ ...this.internalFilter,
+ params: this.internalFilter.params.map(p => {
+ if (this.filter.ref === 'response') {
+ if (p.type === 'header') {
+ p.value = p.value.reduce((obj, { name, expr = '' }) => {
+ return { ...obj, [name]: [expr] }
+ }, {})
+ }
+ }
+
+ return p
+ }),
+ }
+
+ this.$emit('submit', { ...filter, updated: true })
+ this.internalFilter = undefined
},
onHidden () {
this.$emit('reset')
},
-
- onUpdate () {
- this.updated = true
- },
},
}
diff --git a/client/web/admin/src/components/Apigw/CFilterParams.vue b/client/web/admin/src/components/Apigw/CFilterParams.vue
index e98338ed5..ba95049f4 100644
--- a/client/web/admin/src/components/Apigw/CFilterParams.vue
+++ b/client/web/admin/src/components/Apigw/CFilterParams.vue
@@ -12,6 +12,7 @@
>
{{ $t(`filters.labels.${param.label}`) }}
+
+
+
+
+
+
+
+
+
+
+
+
+ ƒ
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + {{ $t('filters.addHeader') }}
+
+
+
+
@@ -115,6 +172,18 @@ export default {
{ value: 307, text: this.$t('filters.httpStatus.307') },
{ value: 308, text: this.$t('filters.httpStatus.308') },
],
+
+ inputTypeOptions: [
+ 'String',
+ 'Any',
+ 'Array',
+ 'KV',
+ 'DateTime',
+ 'Float',
+ 'Integer',
+ 'Reader',
+ 'Vars',
+ ],
}
},
@@ -136,11 +205,5 @@ export default {
})
}
},
-
- methods: {
- onUpdate () {
- this.$emit('update')
- },
- },
}
diff --git a/client/web/admin/src/components/Apigw/CFiltersStepper.vue b/client/web/admin/src/components/Apigw/CFiltersStepper.vue
index b25ee0ec6..635a3e106 100644
--- a/client/web/admin/src/components/Apigw/CFiltersStepper.vue
+++ b/client/web/admin/src/components/Apigw/CFiltersStepper.vue
@@ -1,9 +1,10 @@
-
-
-
-
-
+
+
+
-
-
-
-
-
{{ $t('filters.title') }}
-
+
+
+
+
+
+
+
-
-
diff --git a/client/web/admin/src/components/Apigw/CRouteEditorInfo.vue b/client/web/admin/src/components/Apigw/CRouteEditorInfo.vue
index 41bdb2a27..a1cb5b11b 100644
--- a/client/web/admin/src/components/Apigw/CRouteEditorInfo.vue
+++ b/client/web/admin/src/components/Apigw/CRouteEditorInfo.vue
@@ -30,6 +30,7 @@
>
@@ -68,6 +69,16 @@
/>
+
+
+
+
-
-
-
-
- {{ $t('new') }}
-
-
- {{ $t('profiler') }}
-
-
-
- {{ $t('permissions') }}
-
-
-
-
- {{ $t('yaml') }}
-
-
-
+
+ {{ $t('title') }}
+
+
+
+
+ {{ $t('new') }}
+
+
+
+ {{ $t('profiler') }}
+
+
+
+
+ {{ $t('permissions') }}
+
+
+
+
+ {{ $t('yaml') }}
+
+
+
@@ -92,13 +101,13 @@
-
+
diff --git a/client/web/admin/src/components/Apigw/Profiler/CProfilerRouteHits.vue b/client/web/admin/src/components/Apigw/Profiler/CProfilerRouteHits.vue
index 8bb1031e7..50d79d8ba 100644
--- a/client/web/admin/src/components/Apigw/Profiler/CProfilerRouteHits.vue
+++ b/client/web/admin/src/components/Apigw/Profiler/CProfilerRouteHits.vue
@@ -2,7 +2,7 @@
-
+
+ {{ $t('general:label.refresh') }}
+
+
+ {{ autoRefreshLabel }}
+
+
+
+
- {{ autoRefreshLabel }}
-
-
- {{ $t('general:label.refresh') }}
-
+ {{ $t('purge.this') }}
+
@@ -66,13 +77,13 @@