Skip to content

Commit e18bec4

Browse files
[15.0] Add VTGate debug/status page link to VTAdmin (vitessio#11541)
* feat: add hyperlink using fqdn in vtgates Signed-off-by: Manan Gupta <[email protected]> * feat: provide correct vtgate web address in examples Signed-off-by: Manan Gupta <[email protected]> * refactor: fix prettier errors Signed-off-by: Manan Gupta <[email protected]> Signed-off-by: Manan Gupta <[email protected]>
1 parent 6e1aab8 commit e18bec4

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

examples/local/vtadmin/discovery.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"vtgates": [
1111
{
1212
"host": {
13+
"fqdn": "localhost:15001",
1314
"hostname": "localhost:15991"
1415
}
1516
}

examples/region_sharding/vtadmin/discovery.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"vtgates": [
1111
{
1212
"host": {
13+
"fqdn": "localhost:15001",
1314
"hostname": "localhost:15991"
1415
}
1516
}

web/vtadmin/src/components/routes/Gates.tsx

+12-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export const Gates = () => {
4141
hostname: g.hostname,
4242
keyspaces: g.keyspaces,
4343
pool: g.pool,
44+
fqdn: g.FQDN,
4445
}));
4546
const filtered = filterNouns(filter, mapped);
4647
return orderBy(filtered, ['cluster', 'pool', 'hostname', 'cell']);
@@ -53,7 +54,17 @@ export const Gates = () => {
5354
<div>{gate.pool}</div>
5455
<div className="text-sm text-secondary">{gate.cluster}</div>
5556
</DataCell>
56-
<DataCell className="whitespace-nowrap">{gate.hostname}</DataCell>
57+
<DataCell className="whitespace-nowrap">
58+
{gate.fqdn ? (
59+
<div className="font-bold">
60+
<a href={`//${gate.fqdn}`} rel="noopener noreferrer" target="_blank">
61+
{gate.hostname}
62+
</a>
63+
</div>
64+
) : (
65+
gate.hostname
66+
)}
67+
</DataCell>
5768
<DataCell className="whitespace-nowrap">{gate.cell}</DataCell>
5869
<DataCell>{(gate.keyspaces || []).join(', ')}</DataCell>
5970
</tr>

0 commit comments

Comments
 (0)