zalando-zmon / zmon-cli

ZMON Command Line Interface
http://zmon.readthedocs.org/en/latest/developer/zmon-cli.html
Other
9 stars 9 forks source link

fix KeyError: "dashboard" when running zmon search w/o -n team #66

Closed vetinari closed 7 years ago

vetinari commented 7 years ago

fixes #65 for running with and w/o '-n TEAM' param

codecov[bot] commented 7 years ago

Codecov Report

Merging #66 into master will decrease coverage by 0.24%. The diff coverage is 52.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #66      +/-   ##
==========================================
- Coverage   74.08%   73.83%   -0.25%     
==========================================
  Files          18       18              
  Lines        1042     1055      +13     
==========================================
+ Hits          772      779       +7     
- Misses        270      276       +6
Impacted Files Coverage Δ
zmon_cli/output.py 75.36% <0%> (ø) :arrow_up:
zmon_cli/cmds/search.py 80.76% <100%> (+4.76%) :arrow_up:
zmon_cli/cmds/entity.py 44.87% <37.5%> (-0.85%) :arrow_down:
zmon_cli/client.py 97.65% <66.66%> (-0.65%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 115a51a...ae8e0bf. Read the comment docs.

mohabusama commented 7 years ago

The fix is in client.py: grafana_dashboard_url

It should just get the "id". I also suggest adding a unit test for missing methods.

    "grafana_dashboards": [
        {
            "id": "eagleeye-operational-dashboard",
            "team": "",
            "title": "EagleEye operational dashboard"
        }
    ]
vetinari commented 7 years ago

:+1:

mohabusama commented 7 years ago

Is it possible to include this feature request in this PR:

67

vetinari commented 7 years ago

includes fix for #67

vetinari commented 7 years ago

:+1:

vetinari commented 7 years ago

:+1:

mohabusama commented 7 years ago

👍