Skip to content

Commit

Permalink
cmd/bosun disable items menu point for environments without OpenTSDB …
Browse files Browse the repository at this point in the history
…configured (bosun-monitor#2267)
  • Loading branch information
KozzyKoder authored and Pradeep Mishra committed Jun 18, 2018
1 parent eb0f611 commit 989b8da
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 39 deletions.
78 changes: 40 additions & 38 deletions cmd/bosun/web/static.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion cmd/bosun/web/static/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<link href="/static/css/jquery-ui.min.css" rel="stylesheet">
<link href="/static/css/font-awesome.min.css" rel="stylesheet">
<style>
.disabled, .disabled:hover {
cursor: not-allowed;
color: #999999 !important;
}
.navbar-static-top {
margin-bottom: 19px;
}
Expand Down Expand Up @@ -112,7 +116,10 @@
</div>
<div class="navbar-collapse collapse" id="navbar-collapse">
<ul class="nav navbar-nav">
<li ng-class="active('items')"><a href="/items">Items</a></li>
<li ng-class="active('items')">
<a ng-if="opentsdbEnabled" href="/items">Items</a>
<a ng-if="!opentsdbEnabled" class="disabled" tooltip title="Items available for configured OpenTSDB datasource" href="javascript:void(0)">Items</a>
</li>
<li ng-show="opentsdbEnabled" ng-class="active('graph')"><a href="/graph">Graph</a></li>
<li ng-class="active('expr')"><a href="/expr">Expression</a></li>
<li ng-class="active('config')"><a href="/config">Rule Editor</a></li>
Expand Down

0 comments on commit 989b8da

Please sign in to comment.