feat(remoteingress): add ability to generate remote ingress connection tokens and UI copy action; add hubDomain config option; update remoteingress dependency to ^3.1.1

This commit is contained in:
2026-02-18 06:05:46 +00:00
parent b21f3385e1
commit 0618755236
10 changed files with 113 additions and 8 deletions

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@serve.zone/dcrouter',
version: '6.10.0',
version: '6.11.0',
description: 'A multifaceted routing service handling mail and SMS delivery functions.'
}

View File

@@ -854,6 +854,18 @@ export async function fetchCertificateExport(domain: string) {
});
}
// ============================================================================
// Remote Ingress Standalone Functions
// ============================================================================
export async function fetchConnectionToken(edgeId: string) {
const context = getActionContext();
const request = new plugins.domtools.plugins.typedrequest.TypedRequest<
interfaces.requests.IReq_GetRemoteIngressConnectionToken
>('/typedrequest', 'getRemoteIngressConnectionToken');
return request.fire({ identity: context.identity, edgeId });
}
// ============================================================================
// Remote Ingress Actions
// ============================================================================

View File

@@ -346,6 +346,26 @@ export class OpsViewRemoteIngress extends DeesElement {
);
},
},
{
name: 'Copy Token',
iconName: 'lucide:clipboard-copy',
type: ['inRow', 'contextmenu'] as any,
actionFunc: async (actionData: any) => {
const edge = actionData.item as interfaces.data.IRemoteIngress;
const { DeesToast } = await import('@design.estate/dees-catalog');
try {
const response = await appstate.fetchConnectionToken(edge.id);
if (response.success && response.token) {
await navigator.clipboard.writeText(response.token);
DeesToast.show({ message: `Connection token copied for ${edge.name}`, type: 'success', duration: 3000 });
} else {
DeesToast.show({ message: response.message || 'Failed to get token', type: 'error', duration: 4000 });
}
} catch (err) {
DeesToast.show({ message: `Failed: ${err.message}`, type: 'error', duration: 4000 });
}
},
},
{
name: 'Delete',
iconName: 'lucide:trash2',