Grafana dashboard import to complete the export/import round trip

未關閉
#171 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@laozhej 已經在處理了。

開始於 2026年11月21日。

  • #178 來自 @laozhej —— 未關閉

評估

難度
3/5
預估耗時
1-2 天
新手友好度
68/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
grafana, typescript

研究方向

Start with mcp-server/src/tools/grafanaSnapshot.ts to see how a Grafana MCP tool is registered, confirm-gated, and uses the auth helper; mirror that for homelab_grafanaImport. Update skills/grafana-dashboards/SKILL.md so its create/import/export workflow matches the tool. Run cd mcp-server && npm install && npm test and npm run typecheck. Done means the tool is registered, confirm-gated, size-capped, POSTs dashboard JSON to /api/dashboards/db, returns UID and URL, and docs/tests pass.

由索引模型根據 Issue 內容生成。

描述

enhancement severity: low

Summary

The grafana-dashboards skill promises create, import and export, but only export (homelab_grafanaSnapshot) exists.

Where

  • skills/grafana-dashboards/SKILL.md:3, :45, :49

Details

The agent can generate dashboard JSON but has to hand it back to the user to paste into the UI.

Impact

The skill's import workflow has no tool.

Suggested fix

Add confirm-gated homelab_grafanaImport taking dashboard JSON (size-capped, passed to the node via stdin or base64 rather than inline in the command) and an overwrite flag; POST /api/dashboards/db with the Grafana auth helper; return the UID and URL.

Open questions: folder selection; whether overwrite: true should be the destructive variant.

Acceptance criteria

  • Import tool registered, confirm-gated, size-capped
  • Returns UID and URL

Getting started

  • Relevant files: mcp-server/src/tools/grafanaSnapshot.ts, skills/grafana-dashboards/SKILL.md
  • How to run tests: cd mcp-server && npm install && npm test (and npm run typecheck); structure tests: pip install -r requirements-test.txt && pytest tests/ -v
  • Conventions: see CLAUDE.md and CONTRIBUTING.md

Filed by repo-audit/full-audit at 636fefb. Severity: low. Effort: M. audit-key: enhancement|skills/grafana-dashboards/SKILL.md|homelab_grafanaImport

主要語言
TypeScript
星號
0
分支
4
平均合併
10 小時 16 分鐘
30 天內合併 PR
2

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

TMHSDigital/Home-Lab-Developer-Tools 的其他 Issue

查看 TMHSDigital/Home-Lab-Developer-Tools 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。