1
0
Fork 0

Add TCP Middlewares support

This commit is contained in:
Romain 2021-06-11 15:30:05 +02:00 committed by GitHub
parent 679def0151
commit fc9f41b955
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
134 changed files with 5865 additions and 1852 deletions

View file

@ -125,7 +125,7 @@
</div>
</div>
<div class="col-12 col-md-4 q-mb-lg path-block" v-if="protocol === 'http'">
<div class="col-12 col-md-4 q-mb-lg path-block" v-if="protocol !== 'udp'">
<div class="row no-wrap items-center q-mb-lg app-title">
<q-icon name="eva-layers"></q-icon>
<div class="app-title-label">Middlewares</div>
@ -194,7 +194,7 @@ export default {
...mapGetters('tcp', { tcp_routerByName: 'routerByName' }),
...mapGetters('udp', { udp_routerByName: 'routerByName' }),
hasMiddlewares () {
return this.$route.meta.protocol === 'http' && this.middlewares.length > 0
return this.$route.meta.protocol !== 'udp' && this.middlewares.length > 0
},
protocol () {
return this.$route.meta.protocol
@ -204,11 +204,14 @@ export default {
},
getRouterByName () {
return this[`${this.protocol}_getRouterByName`]
},
getMiddlewareByName () {
return this[`${this.protocol}_getMiddlewareByName`]
}
},
methods: {
...mapActions('http', { http_getRouterByName: 'getRouterByName', getMiddlewareByName: 'getMiddlewareByName' }),
...mapActions('tcp', { tcp_getRouterByName: 'getRouterByName' }),
...mapActions('http', { http_getRouterByName: 'getRouterByName', http_getMiddlewareByName: 'getMiddlewareByName' }),
...mapActions('tcp', { tcp_getRouterByName: 'getRouterByName', tcp_getMiddlewareByName: 'getMiddlewareByName' }),
...mapActions('udp', { udp_getRouterByName: 'getRouterByName' }),
...mapActions('entrypoints', { getEntrypointsByName: 'getByName' }),
refreshAll () {