使用什么样的库来显示图形对象和右键单击上下文菜单

发布于 2024-08-30 07:17:13 字数 394 浏览 2 评论 0原文

目标:开发基于 Web 的 NMS 界面,显示网络拓扑(例如交换机、路由器、链路、终端主机)。每个节点应该是“可移动的”(可手动拖动到适当的位置或通过算法计算出的最佳位置)。我应该能够放大网络图(假设有许多节点集群,并且我想专注于特定的节点集群)。我应该能够右键单击任何节点或链接并获得上下文菜单(例如,“显示路由表”、“显示接口”、“显示带宽利用率图”等)。

该网络拓扑的数据将通过调用基于 apache 的 Web 服务器来获取,其中 Python 中的后端脚本将获取适当的数据并通过 JSON 将其发送到 Web 客户端。

问题:我假设某种 javascript 库/框架最适合此操作 - jQuery、Dojo、Moo 等。[我以前从未使用过其中任何一个]。对于此类事情,最推荐使用其中哪一个。这将是最容易学习的(比如几个月的时间)。

Goal: To develop a web based NMS interface which displays a network topology (e.g., switches, routers, links, endhosts). Each node should be 'movable' (draggable to an appropriate place manually or their best location computed algorithmically). I should be able to zoom into the network graph (say if there are many clusters of nodes and I want to concentrate on a particular cluster of nodes). I should be able to right-click any node or link and get a context menu (e.g., 'show routing table', 'show interfaces', 'show bandwidth utilization graph' etc.).

The data for this network topology will be fetched by making calls to an apache based webserver where the backend scripts in python will fetch the appropriate data and send it via JSON to the web client.

Question: I am assuming that some sort of javascript library/framework will be most appropriate for this - jQuery, Dojo, Moo etc. [I've never used any of these before]. Which of these would be most recommended for this sort of thing. Which would be easiest to learn (say in a months time).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

花间憩 2024-09-06 07:17:13

thejit 的人们使用 javascript 和 HTML canvas 在多数据表示方面做了一些非常出色的工作。它们具有基于网络中连接的节点的交互式界面,您可以放大和缩小并获取更多信息。

我相信您可以对其进行调整以获得您想要的结果。

静态 JSON 树结构用作动画的输入,这也是您想要的。

the people at thejit have done some really great works in Multiple Data Representations using javascript and HTML canvas. They have interactive interfaces based around having nodes connected in a network which you can zoom in and out and get more info about.

I am sure you can tweak it to get the result you are after.

A static JSON Tree structure is used as input for the animations which is also what you want.

零度℉ 2024-09-06 07:17:13

jQuery 可以帮助您进行拖放操作。使用jQuery,快速制作应用程序也非常容易。
但是您必须使用大量节点(交换机、路由器、链路、终端主机)进行测试,看看浏览器应用程序是否能够在复杂性方面管理您的目标。

您可以在此处拖放简单图形表单的示例:
http://helpdesk.toitl.com/?w=drag_drop

现在,在您的应用程序中,您只需将每个表单与其他表单链接起来即可。如果移动节点,请保留链接。

jQuery can help you to make drag and drop operations. With jQuery, it is also very easy to make an application quickly.
But you have to make a test with a huge amount of nodes (switches, routers, links, endhosts) to see if a browser application can be able to manage your target in term of complexity.

You have a sample to drag and drop of simple graphical forms here :
http://helpdesk.toitl.com/?w=drag_drop

Now, in you application, you have just to link each form with others. And keep the links if you move a node.

随波逐流 2024-09-06 07:17:13

考虑到您所要求的复杂性,我会推荐 Silverlight 或 Flash。

如果您了解 C#,那么 Silverlight 是最简单的选择。

jQuery 很棒,但在 C# / Silverlight 中操作 2D 图形和执行复杂的布局算法会容易得多。

Given the complexity of what you are asking, I would recommend Silverlight or Flash.

If you know C# then Silverlight is the easiest option.

jQuery is awesome but manipulating 2D graphics and performing complex layout algorithms will be much easier in C# / Silverlight.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文