astarte/astarte-dashboardAstarte Dashboard是一个Web UI,用于可视化领域状态并执行管理任务,如安装接口和触发器、管理设备、管道和流程。
[]([***]
Astarte Dashboard默认部署在所有Astarte实例上。
当使用__docker-compose__本地部署时,访问http://localhost:4040。
在__Kubernetes__集群上,URL在Astarte Voyager入口控制器配置中指定。
或在Astarte Cloud上试用__Astarte即服务__。
开始前必须具备:
Astarte Dashboard依赖配置文件设置Astarte API URL等参数。打开Dashboard时,会搜索包含以下键的config.json文件:
astarte_api_url(必填): Astarte API端点的基础URL。用于推导所有Astarte组件的端点:
特殊字符串localhost会设置为Astarte 5分钟快速入门中使用的端点:
http://localhost:4002http://localhost:4000http://localhost:4003http://localhost:4009在自定义部署中,这些URL可能不同,可通过以下可选键覆盖:
default_realm(可选): 默认登录的领域。
enable_flow_preview(可选):
要求Astarte集群已配置并运行Flow。启用(设为true)后,仪表板将显示Flow API状态及相关页面(如流程、管道和块)。
auth(必填): 可用的登录认证选项列表。
支持的认证方式:直接令牌或OAuth2隐式授权
oauth: 遵循OAuth标准,仪表板会重定向到OAuth提供商登录,成功后重定向回仪表板。
token: 需要令牌来认证Astarte API。可使用astartectl从领域私钥生成令牌。
如启用多个认证选项,用户可选择任一方式。
default_auth(必填): 尝试登录时显示的默认认证选项。
配置示例:
json{ "astarte_api_url": "[***]", "enable_flow_preview": true, "default_realm": "myrealm", "default_auth": "token", "auth": [ { "type": "token" }, { "type": "oauth", "oauth_api_url": "[***]" } ] }
可使用Dockerhub公共 registry 中的官方Docker镜像轻松运行Astarte Dashboard。
例如,在本地端口4040运行:
shdocker run \ -p 4040:80 \ -v /绝对路径/to/config.json:/usr/share/nginx/html/user-config/config.json \ astarte/astarte-dashboard:snapshot
Astarte Dashboard使用TypeScript和React框架开发,依赖npm管理包:
shgit clone ***:astarte-platform/astarte-dashboard.git && cd astarte-dashboard
shnpm install
src/user-config/config.jsonshnpm run start
http://localhost:8080测试使用Cypress,通过无头浏览器模拟用户交互。测试前需启动浏览器可访问的仪表板服务器,使用start-ci命令:
shnpm run start-ci
服务器启动后,可通过test命令在CLI中运行测试:
shnpm run test
如需测试特定页面或组件,可打开Cypress GUI:
shnpm run cypress:open
其他常规测试包括格式检查和类型检查:
shnpm run check-format npm run check-types
采用Apache2.0许可证分发。详见LICENSE。


manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务