Moving to mode replacing http and protocol fields

This commit is contained in:
Owen
2026-05-27 12:04:00 -07:00
parent 464d4990df
commit 06cc13c637
15 changed files with 150 additions and 71 deletions

View File

@@ -88,7 +88,7 @@ export type ResourceRow = {
name: string;
orgId: string;
domain: string;
browserAccessType: string | null;
mode: string | null;
authState: string;
http: boolean;
protocol: string;
@@ -412,10 +412,7 @@ export default function ProxyResourcesTable({
),
cell: ({ row }) => {
const resourceRow = row.original;
if (
!resourceRow.http ||
resourceRow.browserAccessType !== "http"
) {
if (!resourceRow.http || resourceRow.mode !== "http") {
return <span>-</span>;
}
return (
@@ -446,10 +443,7 @@ export default function ProxyResourcesTable({
header: () => <span className="p-3">{t("uptime30d")}</span>,
cell: ({ row }) => {
const resourceRow = row.original;
if (
!resourceRow.http ||
resourceRow.browserAccessType !== "http"
) {
if (!resourceRow.http || resourceRow.mode !== "http") {
return <span>-</span>;
}
return (

View File

@@ -36,9 +36,9 @@ export default function ResourceInfoBox({}: ResourceInfoBoxType) {
resource.fullDomain &&
build != "oss"
);
const showType = !!(resource.http && resource.browserAccessType);
const showType = !!(resource.http && resource.mode);
const showHealth =
!["ssh", "rdp", "vnc"].includes(resource.browserAccessType || "") &&
!["ssh", "rdp", "vnc"].includes(resource.mode || "") &&
!!resource.health &&
resource.health !== "unknown";
const showVisibility = !resource.enabled;
@@ -88,7 +88,7 @@ export default function ResourceInfoBox({}: ResourceInfoBoxType) {
</InfoSectionTitle>
<InfoSectionContent>
<span className="inline-flex items-center">
{resource.browserAccessType!.toUpperCase()}
{resource.mode!.toUpperCase()}
</span>
</InfoSectionContent>
</InfoSection>