We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aeedaa4 commit 7e6c6e0Copy full SHA for 7e6c6e0
src/views/schema/routes/edit.vue
@@ -326,11 +326,13 @@ export default class extends Vue {
326
327
private async getData() {
328
const { id } = this.$route.params
329
- const {
+ let {
330
node: {
331
value: {
332
+ uri = '',
333
uris = [],
334
hosts = [],
335
+ host = '',
336
remote_addr = '',
337
upstream_id = '',
338
service_id = '',
@@ -341,6 +343,14 @@ export default class extends Vue {
341
343
}
342
344
} = await getRouter(id) as any
345
346
+ if (hosts.length === 0 && host.length > 0) {
347
+ hosts.push(host)
348
+ }
349
+
350
+ if (uris.length === 0 && uri.length > 0) {
351
+ uris.push(uri)
352
353
354
this.form = {
355
uris,
356
hosts,
0 commit comments