From 7b21b9f5477196a05a31ca3c4a9513f239b984fa Mon Sep 17 00:00:00 2001 From: gonzaloaune Date: Wed, 22 Apr 2026 16:14:06 +0000 Subject: [PATCH] Generated with Hive: Register HiveRelay node in superadmin UI with sidebar panel and version updater --- app/public/swarm/hiverelay.png | Bin 0 -> 560 bytes app/src/HiveRelay.svelte | 67 +++++++++++++++++++++++++++++ app/src/controls/Controller.svelte | 3 ++ app/src/controls/controls.ts | 3 ++ app/src/nodes.ts | 2 + 5 files changed, 75 insertions(+) create mode 100644 app/public/swarm/hiverelay.png create mode 100644 app/src/HiveRelay.svelte diff --git a/app/public/swarm/hiverelay.png b/app/public/swarm/hiverelay.png new file mode 100644 index 0000000000000000000000000000000000000000..ae7ad62f3483eb3f579eba0e18e078901a9b2e3a GIT binary patch literal 560 zcmV-00?+-4P)-~_rA7uFbHDV_jt01*sJ;tk*g_6RIBw0*uAXeC$| zHXT{Wmy~wOgn!;+-rrY(Flw_C0k<5%fk7B}4d&=vcr>%MC}S))9T1EnKVK;paV(c7 zb`ao@3X4dI@B~BXY!WK^5Nx(kjsvY;Q$3zI^4K}`$VW~*H@RkEA*!&_CJkGB6_)Te zXtD=GqzW^mtiQCdhrbj)zaftpN2{sN8+&!|(&p~k7-zwojuFI0*8cadS zshy1Hr#Tr+Uz0S9bBGIF|#1$R6?wbJUeFX|E0$J+*}V_V5o# zU|~`3rNpb_72UxQ7U4hwb5p%q8Am*EaL=wCVv?6%Yp*5|ju(!S0000 + import { InlineNotification } from "carbon-components-svelte"; + import NodeVersionupdater from "./components/NodeVersionupdater.svelte"; + export let updateBody = () => {}; + import { selectedNode } from "./store"; + let success = false; + let notification_message = ""; + let show_notification = false; + + function handleNodeVersionUpdateSuccess() { + updateBody(); + + success = true; + notification_message = `${$selectedNode.name} version updated successfully`; + show_notification = true; + } + + function handleNodeVersionUpdateError(errMsg: string) { + success = false; + notification_message = errMsg; + show_notification = true; + } + + +
+ {#if show_notification} + { + e.preventDefault(); + show_notification = false; + }} + /> + {/if} + {#if $selectedNode && $selectedNode.host} + + {/if} + +
+ + diff --git a/app/src/controls/Controller.svelte b/app/src/controls/Controller.svelte index c7ef09566..ce101c346 100644 --- a/app/src/controls/Controller.svelte +++ b/app/src/controls/Controller.svelte @@ -18,6 +18,7 @@ import Neo4j from "../Neo4j.svelte"; import Stakgraph from "../Stakgraph.svelte"; import Repo2Graph from "../Repo2Graph.svelte"; + import HiveRelay from "../HiveRelay.svelte"; import Bot from "../Bot.svelte"; export let updateBody = () => {}; @@ -113,6 +114,8 @@ {:else if type === "Repo2Graph"} + {:else if type === "HiveRelay"} + {:else if type === "Bot"} {:else} diff --git a/app/src/controls/controls.ts b/app/src/controls/controls.ts index e57dfa472..6a71d275a 100644 --- a/app/src/controls/controls.ts +++ b/app/src/controls/controls.ts @@ -90,6 +90,8 @@ const stakgraphControls: Control[] = []; const repo2graphControls: Control[] = []; +const hiverelayControls: Control[] = []; + const botControls: Control[] = []; export const controls = { @@ -106,5 +108,6 @@ export const controls = { Neo4j: neo4jControls, Stakgraph: stakgraphControls, Repo2Graph: repo2graphControls, + HiveRelay: hiverelayControls, Bot: botControls, }; diff --git a/app/src/nodes.ts b/app/src/nodes.ts index 342e66e7c..1e9048bc8 100644 --- a/app/src/nodes.ts +++ b/app/src/nodes.ts @@ -56,6 +56,7 @@ export type NodeType = | "Llama" | "Repo2Graph" | "Stakgraph" + | "HiveRelay" | "Bot"; export const allNodeTypes: NodeType[] = [ @@ -214,6 +215,7 @@ const defpos = { tribes_1: [1160, 175], tribes_2: [1160, 425], tribes_3: [1160, 675], + hive_relay: [1150, 675], }; export const smalls = ["lss", "neo4j", "elastic", "cache", "lss_1"];