feat(connections): fallback host column to destinationIP

This commit is contained in:
kunish 2023-08-29 23:16:17 +08:00
parent 49bf6c7e2d
commit 4e5f8d2b3d
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430
3 changed files with 15 additions and 6 deletions

View File

@ -1,5 +1,6 @@
import { Route, Routes, useNavigate } from '@solidjs/router' import { Route, Routes, useNavigate } from '@solidjs/router'
import { Show, lazy, onMount } from 'solid-js' import { Show, lazy, onMount } from 'solid-js'
import { Footer } from '~/components/Footer'
import { Header } from '~/components/Header' import { Header } from '~/components/Header'
import { curTheme, selectedEndpoint } from '~/signals' import { curTheme, selectedEndpoint } from '~/signals'
@ -42,11 +43,7 @@ export const App = () => {
</Routes> </Routes>
</div> </div>
<footer class="footer footer-center hidden rounded bg-base-200 p-2 text-base-content sm:block"> <Footer />
<a href="https://github.com/metacubex/metacubexd" target="_blank">
metacubexd
</a>
</footer>
</div> </div>
) )
} }

11
src/components/Footer.tsx Normal file
View File

@ -0,0 +1,11 @@
export const Footer = () => (
<footer class="footer footer-center hidden rounded bg-base-200 p-2 text-base-content sm:block">
<a
class="font-semibold"
href="https://github.com/metacubex/metacubexd"
target="_blank"
>
metacubexd
</a>
</footer>
)

View File

@ -116,7 +116,8 @@ export default () => {
}, },
{ {
accessorKey: 'Host', accessorKey: 'Host',
accessorFn: (row) => row.metadata.host, accessorFn: (row) =>
row.metadata.host ? row.metadata.host : row.metadata.destinationIP,
}, },
{ {
accessorKey: 'Rule', accessorKey: 'Rule',