-
-
-
-
- {{ socket.endpoint }}
-
-
-
- direct
-
-
-
-
- {{ getDirectionArrow(socket.direction) }}
-
-
-
-
-
-
-
-
- Distance: {{ socket.properties.distance }}
- • Created: {{ formatTime(socket.properties.known_since) }}
-
+
+
+
+
+
+
+ {{ socket.endpoint }}
+
+ direct
+
+ {{ getDirectionArrow(socket.direction) }}
+
+
+ Distance: {{ socket.properties.distance }}
+ • Created: {{ formatTime(socket.properties.known_since) }}
+
+
+
No matching endpoints found.
+
diff --git a/src/components/ComHubOverviewWrapper.vue b/src/components/ComHubOverviewWrapper.vue
new file mode 100644
index 00000000..bd5c209c
--- /dev/null
+++ b/src/components/ComHubOverviewWrapper.vue
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/endpoint/EndpointDocs.vue b/src/components/endpoint/EndpointDocs.vue
new file mode 100644
index 00000000..b3ef4c7c
--- /dev/null
+++ b/src/components/endpoint/EndpointDocs.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/endpoint/EndpointFingerprint.vue b/src/components/endpoint/EndpointFingerprint.vue
new file mode 100644
index 00000000..a960a91e
--- /dev/null
+++ b/src/components/endpoint/EndpointFingerprint.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+ Fingerprint
+
+
+
+
+{{ fingerprintText }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/endpoint/EndpointHeader.vue b/src/components/endpoint/EndpointHeader.vue
new file mode 100644
index 00000000..e69de29b
diff --git a/src/components/endpoint/EndpointInterfaces.vue b/src/components/endpoint/EndpointInterfaces.vue
new file mode 100644
index 00000000..04efb81a
--- /dev/null
+++ b/src/components/endpoint/EndpointInterfaces.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
+ Public Interfaces
+
+
+
+ No public interfaces exposed by this endpoint.
+
+
+
+
+
+
+
+ {{ iface.properties?.name || iface.uuid }}
+
+
+
+ {{ iface.uuid }}
+
+
+
+
+
+
+ Type:
+ {{ iface.properties.interface_type }}
+
+
+
+ Channel:
+ {{ iface.properties.channel }}
+
+
+
+ Direction:
+ {{ iface.properties.direction }}
+
+
+
+ RTT:
+ {{ iface.properties.round_trip_time }} ms
+
+
+
+ Max Bandwidth:
+ {{ formatBandwidth(iface.properties.max_bandwidth) }}
+
+
+
+
+
+ Waiting for socket connections…
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/endpoint/EndpointMethods.vue b/src/components/endpoint/EndpointMethods.vue
new file mode 100644
index 00000000..e69de29b
diff --git a/src/components/endpoint/EndpointPointers.vue b/src/components/endpoint/EndpointPointers.vue
new file mode 100644
index 00000000..479577dc
--- /dev/null
+++ b/src/components/endpoint/EndpointPointers.vue
@@ -0,0 +1,55 @@
+
+
+
+
+
+ Pointer View
+
+
+
+ No pointers currently loaded in the runtime.
+
+
+
+
+
+
+ {{ pointerId }}
+
+
+
+
+{{ formatContainer(container) }}
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/endpoint/EndpointView.vue b/src/components/endpoint/EndpointView.vue
new file mode 100644
index 00000000..292fa694
--- /dev/null
+++ b/src/components/endpoint/EndpointView.vue
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
{{ endpoint.name }}
+
+ {{ getEndpointTag(endpoint.id, String(Datex.endpoint)) }}
+
+
+
+ {{ endpoint.description }}
+
+
+ Profile: {{ endpoint.profile }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/composable/useComHub.ts b/src/composable/useComHub.ts
new file mode 100644
index 00000000..4e258bd9
--- /dev/null
+++ b/src/composable/useComHub.ts
@@ -0,0 +1,6 @@
+import { reactive } from 'vue'
+
+export const comhub = reactive({
+ endpoint: '@@FB2D5CF3FBE8CF00FC4518DAF76A189602E1',
+ // TODO: Replace with live runtime state
+})
\ No newline at end of file
diff --git a/src/lib/runtime.ts b/src/lib/runtime.ts
index 97af3bfd..620b34e6 100644
--- a/src/lib/runtime.ts
+++ b/src/lib/runtime.ts
@@ -1,50 +1,25 @@
-import { Runtime, DIF } from '@unyt/datex';
+import { Runtime, DIF } from '@unyt/datex'
+import type { RuntimeConfig } from '@unyt/datex'
-/**
- * The default configuration for the Datex runtime.
- */
-const defaultConfig = {
- // interfaces: [{
- // type: "websocket-client",
- // config: { address: "wss://example.unyt.land" },
- // }],
- debug: false, // set to true to show info/debug messages
-};
+const defaultConfig: RuntimeConfig = {
+ interfaces: [
+ {
+ type: 'websocket-client',
+ config: {
+ url: 'wss://example.unyt.land',
+ },
+ },
+ ],
+}
-/**
- * The default instance of the Datex runtime.
- */
-export const Datex: Runtime = await Runtime.create(defaultConfig, {
- allow_unsigned_blocks: true,
-});
+export const Datex: Runtime = await Runtime.create(defaultConfig)
-/**
- * Returns a map of pointers that are currently loaded in the runtime.
- * The keys are pointer identifiers and the values are DIFContainer objects
- * representing the values stored at the pointer.
- */
-export function getPointers(): Map
{
- // some example JS values
- const values = [
- 42,
- 'Hello, World!',
- true,
- { a: 1, b: 2 },
- [1, 2, 3, 4, 5],
- {
- nested: {
- key: 'value',
- arr: [10, 20, 30],
- },
- },
- ];
- const pointers = new Map(
- values.map((value, index) => {
- const difValue = Datex.dif.convertJSValueToDIFValue(
- value,
- ) as DIF.Definitions.DIFContainer;
- return [`$${index.toString().padStart(16, '0')}`, difValue];
- }),
- );
- return pointers;
-}
+export function getPointers(): Map {
+ const mock: [string, DIF.Definitions.DIFValueContainer][] = [
+ ['$std', { type: 'object', name: 'std' } as unknown as DIF.Definitions.DIFValueContainer],
+ ['$file_server', { type: 'object', name: 'file_server' } as unknown as DIF.Definitions.DIFValueContainer],
+ ['$webrtc', { type: 'object', name: 'webrtc' } as unknown as DIF.Definitions.DIFValueContainer],
+ ['$Math', { type: 'object', name: 'Math' } as unknown as DIF.Definitions.DIFValueContainer],
+ ]
+ return new Map(mock)
+}
\ No newline at end of file
diff --git a/src/router/index.ts b/src/router/index.ts
index 25326a55..844d4eca 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -16,14 +16,19 @@ const router = createRouter({
component: () => import('@/views/BlockViewer/DatexBlockProtocolViewWrapper.vue'),
},
{
- path: '/',
+ path: '',
name: 'Editor',
component: WindowGeneralView,
},
{
path: '/comhub',
name: 'comhub-overview',
- component: () => import('@/components/ComHubOverview.vue'),
+ component: () => import('@/components/ComHubOverviewWrapper.vue'),
+ },
+ {
+ path: '/u/:endpoint_id',
+ name: 'endpoint',
+ component: () => import('@/components/endpoint/EndpointView.vue'),
},
],
});