mirror of
https://github.com/fatedier/frp.git
synced 2026-04-20 16:09:10 +08:00
web: fix el-popover bug (#3413)
* web: update * web: fix el-popover bug
This commit is contained in:
41
web/frps/src/components/ProxiesHTTP.vue
Normal file
41
web/frps/src/components/ProxiesHTTP.vue
Normal file
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<ProxyView :proxies="proxies" proxyType="http" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { HTTPProxy } from '../utils/proxy.js'
|
||||
import ProxyView from './ProxyView.vue'
|
||||
|
||||
let proxies = ref<HTTPProxy[]>([])
|
||||
|
||||
const fetchData = () => {
|
||||
let vhost_http_port: number
|
||||
let subdomain_host: string
|
||||
fetch('../api/serverinfo', { credentials: 'include' })
|
||||
.then((res) => {
|
||||
return res.json()
|
||||
})
|
||||
.then((json) => {
|
||||
vhost_http_port = json.vhost_http_port
|
||||
subdomain_host = json.subdomain_host
|
||||
if (vhost_http_port == null || vhost_http_port == 0) {
|
||||
return
|
||||
}
|
||||
fetch('../api/proxy/http', { credentials: 'include' })
|
||||
.then((res) => {
|
||||
return res.json()
|
||||
})
|
||||
.then((json) => {
|
||||
for (let proxyStats of json.proxies) {
|
||||
proxies.value.push(
|
||||
new HTTPProxy(proxyStats, vhost_http_port, subdomain_host)
|
||||
)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
fetchData()
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
Reference in New Issue
Block a user