@clevercloud/warp10-cubism

中文文档
5.1.0发布于 2025/06/24MITCommonJS近 30 天下载 1809

Warp10 Cubism =============

原始使用文档
文档目录6 节
  1. Build and use
  2. API
  3. Events
  4. Events to send to the module
  5. Events received from the module
  6. Example

Warp10 Cubism

Warp10 Cubism is a Warp10 graphical plugin to display data using Cubism

While it's not yet quite ready and mostly Clever Cloud oriented for now, it should be usuable if you want to display some Geo time series coming from Warp10.

This plugin uses the Mobius interface of Warp10 through Websocket to live stream the points.

This module relies heavly on Bacon.js to receive from / send data to the module.

Build and use

You can build this module (LESS and JST) by using grunt.

You can then require this module using webpack or any other tool.

API

The module is a function accepting an object:

  • $container: A JQuery object where the module will live with a <div class="metrics-overview"></div> in it
  • s_token: A Bacon.js property with a read token for Warp10
  • s_instances: A Bacon.js property with an array of Clever Cloud instances
  • s_requestUnload: A Bacon.js stream which is used to stop actions when an event is received (used with .takeUntil())
  • app: A Clever Cloud application object
  • owner: A Clever Cloud owner object (user or organization) which own the application
  • b_inputEvents: A Bacon.js bus used to send events to the module
  • b_outputEvents: A Bacon.js bus used to receive events from the module
  • Translations: A function (key: string) -> string that returns the translation corresponding to the given key

Events

It's an object of the form: Object<T>{type: string, data: T} where T can be anything (only used in CHANGE_VIEW for now)

Events to send to the module

  • PAGE_READY: To send when the page is ready, no data (mandatory)
  • PAGE_RESIZE_START: To send when the page is resizing. It will show a loader (optional)
  • PAGE_RESIZE_END: To send when the page resizing is done. It will redraw cubism and fetch missing points (optional)

Events received from the module

  • CHANGE_VIEW: This event is most likely not used unless you add other views (like it's done in the Clever Cloud console). You will receive the new view to show, which may be GLOBAL (string) here. When received, you need to re-instanciate the $Metrics module.

Example

const state = $Metrics({...});
$Metrics.start(state);

版本与发布记录

@clevercloud/warp10-cubism 共发布 3 个版本,首次发布于 2025/06/18;过去 12 个月发布了 0 个版本。

版本发布日期距今
5.1.0latest2025/06/241.4 年前
5.0.02025/06/241.4 年前
4.1.02025/06/181.4 年前

关于 @clevercloud/warp10-cubism 的常见问题

@clevercloud/warp10-cubism 是什么?

Warp10 Cubism =============

如何安装 @clevercloud/warp10-cubism?

在项目目录运行 npm install @clevercloud/warp10-cubism,或使用 pnpm add / yarn add / bun add。

@clevercloud/warp10-cubism 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/clevercloud__warp10-cubism 是否存在。

@clevercloud/warp10-cubism 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@clevercloud/warp10-cubism 可以商用吗?

@clevercloud/warp10-cubism 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@clevercloud/warp10-cubism 的下载量有多少?

根据 npm 官方下载统计,@clevercloud/warp10-cubism 在 2026/10/10 – 2026/11/08 这 30 天内被下载 1,809 次,日均约 60 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@clevercloud/warp10-cubism 还在维护吗?

最新版本 5.1.0 发布于 2025/06/24(1.4 年前);至今共发布 3 个版本,其中过去 12 个月发布了 0 个;首次发布于 2025/06/18。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。