bosun.org@v0.0.0-20210513094433-e25bc3e69a1f/cmd/bosun/web/static/partials/graph.html (about) 1 <style type="text/css"> 2 .graph.nav-tabs { 3 margin-bottom: 15px; 4 margin-top: 15px; 5 } 6 .dropdown-menu { 7 overflow-y: auto; 8 max-height: 500px; 9 } 10 </style> 11 <div class="row"> 12 <div class="col-sm-12"> 13 <form class="form-inline"> 14 <div class="form-group"> 15 <input 16 type="text" 17 class="form-control col-sm-2" 18 ng-model="start" 19 placeholder="Start" 20 tooltip 21 title="Can be absolute or relative time. Relative times follow the format <amount><time unit>-ago. Time Units are ms (Millisecond), s (second), m (minute), h (hour), d (day), w (week), n (month), y (year). Absolute time is in the format yyyy/MM/dd-HH:mm:ss , where any of the time (but not date) parts can be omitted." 22 ng-keydown="keydown($event)" 23 tabindex="5" 24 > 25 </div> 26 <div class="form-group"> 27 <input 28 type="text" 29 class="form-control" 30 ng-model="end" 31 placeholder="End" 32 tooltip 33 title="Current time if blank. Can be absolute or relative time. Relative times follow the format <amount><time unit>-ago. Time Units are ms (Millisecond), s (second), m (minute), h (hour), d (day), w (week), n (month), y (year). Absolute time is in the format yyyy/MM/dd-HH:mm:ss , where any of the time (but not date) parts can be omitted." 34 ng-keydown="keydown($event)" 35 tabindex="5" 36 > 37 </div> 38 <button class="btn btn-primary" ng-click="Query()" tabindex="5">Query</button> 39 <button class="btn btn-default" tooltip title="Switch between absolute and relative time. Switching from absolute to relative time rounds the time." ng-click="SwitchTimes()" tabindex="5">Switch Time</button> 40 <div class="checkbox" tooltip title="Auto downsample using avg and the width in pixels of the displayed graph (recommended). Overrides any downsample options from the query below"> 41 <label> 42 <input type="checkbox" ng-model="autods" tabindex="5"> Auto Downsample 43 </label> 44 </div> 45 <div class="checkbox" tooltip title="Refresh every five seconds"> 46 <label> 47 <input type="checkbox" ng-model="refresh" tabindex="5"> Refresh 48 </label> 49 </div> 50 <div class="checkbox" tooltip title="Normalize each series to 0-100% of the max value of the series. This is helpful for viewing correlation with multiple series of different metrics"> 51 <label> 52 <input type="checkbox" ng-model="normalize" tabindex="5"> Normalize 53 </label> 54 </div> 55 <div class="checkbox" tooltip title="Show Annotations. Hold shift when brushing graph to create an annotation." ng-show="annotateEnabled"> 56 <label> 57 <input type="checkbox" ng-model="showAnnotations" ng-change="setShowAnnotations()" tabindex="5"> Annotations 58 </label> 59 </div> 60 <div class="pull-right" ng-show="url"> 61 <ts-popup url="url" tabindex="5"></ts-popup> 62 <a class="btn btn-default" ng-href="{{url}}&png=.png" target="_blank" tabindex="5">image</a> 63 </div> 64 </form> 65 </div> 66 </div> 67 <div class="row"> 68 <div class="col-sm-9"> 69 <ul class="graph nav nav-tabs"> 70 <li ng-repeat="t in query_p" ng-class="{active: $index == index}"><a href ng-click="setIndex($index)" tabindex="5">Query {{$index + 1}}</a></li> 71 <li><a href ng-click="AddTab()" tabindex="5">+</a></li> 72 </ul> 73 </div> 74 <div class="col-sm-3"> 75 <form class="form-inline"> 76 <div class="form-group col-sm-6" tooltip title="Y axis minimum; leave empty for auto."> 77 <label class="control-label">y min</label> 78 <div> 79 <input type="number" class="form-control" style="width: 100%" ng-model="min" tabindex="5"> 80 </div> 81 </div> 82 <div class="form-group col-sm-6" tooltip title="Y axis maximum; leave empty for auto."> 83 <label class="control-label">y max</label> 84 <div> 85 <input type="number" class="form-control" style="width: 100%" ng-model="max" tabindex="5"> 86 </div> 87 </div> 88 </form> 89 </div> 90 </div> 91 <div class="row"> 92 <div class="col-sm-12"> 93 <div class="tab-content"> 94 <div class="tab-pane" ng-class="{active: $index == index}" ng-repeat="t in query_p"> 95 <div ng-if="filterSupport"> 96 <form class="form-horizontal col-sm-4"> 97 <div class="form-group"> 98 <label class="col-sm-4 control-label">Metric</label> 99 <div class="col-sm-8"> 100 <input type="text" class="form-control" ng-model="t.metric" bs-options="m for m in metrics" ng-change="GetTagKByMetric($index)" ng-init="GetTagKByMetric($index)" limit="100" bs-typeahead min-length="0" bs-typeahead tabindex="3" autofocus ng-keydown="keydown($event)"> 101 </div> 102 </div> 103 <div class="form-group"> 104 <label class="col-sm-4 control-label" tooltip title="The method used to combine multiple time series into a single time series. This behavior happens when specific or (*) values are omitted for tags.">Aggregator</label> 105 <div class="col-sm-8"> 106 <select class="form-control" ng-model="t.aggregator" ng-options="agg as agg for agg in aggregators" tabindex="3"></select> 107 </div> 108 </div> 109 <div class="form-group" ng-hide="autods"> 110 <label class="col-sm-4 control-label" tooltip title="Downsample the data into fewer datapoints. Requires that the downsample window value is also provided.">Downsample</label> 111 <div class="col-sm-8"> 112 <select ng-model="t.ds" ng-change="t.setDs()" ng-options="agg as agg for agg in dsaggregators" class="form-control" tabindex="3"></select> 113 </div> 114 </div> 115 <div class="form-group" ng-hide="autods"> 116 <label class="col-sm-4 control-label" tooltip title="The time window to downsample to. For example 1h would return a datapoint for every hour by performing the downsample function over that hour. Time units are ms (millisecond), s (second), m (minute), h (hour), d (day), w (week), n (month), y (year).">Window</label> 117 <div class="col-sm-8"> 118 <input type="text" class="form-control" ng-model="t.dstime" ng-change="t.setDs()" tabindex="3" ng-keydown="keydown($event)"> 119 </div> 120 </div> 121 <div class="form-group" ng-class="{'has-error': !canAuto[t.metric] && t.derivative == 'auto'}"> 122 <label class="col-sm-4 control-label" tooltip title="If not set to gauge, this returns a per-second rate of change between points. If the values always increase (except for resets and rollovers), use counter. If the values can go down, use rate. A warning color indicates auto will default to counter.">Type</label> 123 <div class="col-sm-8"> 124 <select ng-model="t.derivative" ng-change="t.setDerivative()" ng-options="r as r for r in rate_options" class="form-control" tabindex="3"></select> 125 </div> 126 </div> 127 <div class="form-group" ng-show="t.derivative == 'counter'"> 128 <label class="col-sm-4 control-label" tooltip title="A positive integer representing the maximum value for the counter.">Max</label> 129 <div class="col-sm-8"> 130 <input type="number" class="form-control" ng-model="t.rateOptions.counterMax"> 131 </div> 132 </div> 133 </form> 134 <form class="form-horizontal col-sm-8"> 135 <div class="form-group" ng-repeat="k in sorted_tagks[$index]"> 136 <label class="col-sm-2 control-label" tooltip title="Enter in values to filter tags. The first filter (function and value) will act as a group by function - each match will corespond to a series. The second filter for the tag will filter the results of the series; instead of generating a new series the filtered series will be aggregated.">{{k}} ({{tagvs[$parent.$index][k].length}})</label> 137 <div class="col-sm-2"> 138 <select title="Function to be used for a groupby filter." class="form-control" ng-model="t.gbFilters[k].type" ng-options="f as f for f in filters" tabindex="4"></select> 139 </div> 140 <div class="col-sm-3"> 141 <input type="text" class="form-control" ng-model="t.gbFilters[k].filter" bs-options="tv for tv in tagvs[$parent.$index][k]" bs-typeahead min-length="0" limit="100" ng-disabled="!t.metric_tags[k]" tabindex="4" ng-keydown="keydown($event)"> 142 </div> 143 <div class="col-sm-2"> 144 <select title="Function to be used for a non-groupby filter." class="form-control" ng-model="t.nGbFilters[k].type" ng-options="f as f for f in filters" tabindex="4"></select> 145 </div> 146 <div class="col-sm-3"> 147 <input type="text" class="form-control" ng-model="t.nGbFilters[k].filter" bs-options="tv for tv in tagvs[$parent.$index][k]" bs-typeahead min-length="0" limit="100" ng-disabled="!t.metric_tags[k]" tabindex="4" ng-keydown="keydown($event)"> 148 </div> 149 </div> 150 </form> 151 </div> 152 153 <div ng-if="! filterSupport"> 154 <form class="form-horizontal col-sm-4"> 155 <div class="form-group"> 156 <label class="col-sm-4 control-label">Metric</label> 157 <div class="col-sm-8"> 158 <input type="text" class="form-control" ng-model="t.metric" bs-options="m for m in metrics" ng-change="GetTagKByMetric($index)" ng-init="GetTagKByMetric($index)" limit="100" bs-typeahead min-length="0" bs-typeahead > 159 </div> 160 </div> 161 <div class="form-group"> 162 <label class="col-sm-4 control-label" tooltip title="The method used to combine multiple time series into a single time series. This behavior happens when specific or (*) values are omitted for tags.">Aggregator</label> 163 <div class="col-sm-8"> 164 <select class="form-control" ng-model="t.aggregator" ng-options="agg as agg for agg in aggregators"></select> 165 </div> 166 </div> 167 <div class="form-group" ng-hide="autods"> 168 <label class="col-sm-4 control-label" tooltip title="Downsample the data into fewer datapoints. Requires that the downsample window value is also provided.">Downsample</label> 169 <div class="col-sm-8"> 170 <select ng-model="t.ds" ng-change="t.setDs()" ng-options="agg as agg for agg in dsaggregators" class="form-control"></select> 171 </div> 172 </div> 173 <div class="form-group" ng-hide="autods"> 174 <label class="col-sm-4 control-label" tooltip title="The time window to downsample to. For example 1h would return a datapoint for every hour by performing the downsample function over that hour. Time units are ms (millisecond), s (second), m (minute), h (hour), d (day), w (week), n (month), y (year).">Window</label> 175 <div class="col-sm-8"> 176 <input type="text" class="form-control" ng-model="t.dstime" ng-change="t.setDs()"> 177 </div> 178 </div> 179 </form> 180 <form class="form-horizontal col-sm-4"> 181 <div class="form-group" ng-class="{'has-error': !canAuto[t.metric] && t.derivative == 'auto'}"> 182 <label class="col-sm-4 control-label" tooltip title="If not set to gauge, this returns a per-second rate of change between points. If the values always increase (except for resets and rollovers), use counter. If the values can go down, use rate. A warning color indicates auto will default to counter.">Series Type</label> 183 <div class="col-sm-8"> 184 <select ng-model="t.derivative" ng-change="t.setDerivative()" ng-options="r as r for r in rate_options" class="form-control"></select> 185 </div> 186 </div> 187 <div class="form-group" ng-show="t.derivative == 'counter'"> 188 <label class="col-sm-4 control-label" tooltip title="A positive integer representing the maximum value for the counter.">Counter Max</label> 189 <div class="col-sm-8"> 190 <input type="number" class="form-control" ng-model="t.rateOptions.counterMax"> 191 </div> 192 </div> 193 </form> 194 <form class="form-horizontal col-sm-4"> 195 <div class="form-group" ng-repeat="k in sorted_tagks[$index]"> 196 <label class="col-sm-4 control-label" tooltip title="Tag values for the tag. Can have multiple seperate by | which will return a time series for each one. Can also be * which returns a time series for each possible value.">{{k}} ({{tagvs[$parent.$index][k].length}})</label> 197 <div class="col-sm-8"> 198 <input type="text" class="form-control" ng-model="t.tags[k]" bs-options="tv for tv in tagvs[$parent.$index][k]" bs-typeahead min-length="0" limit="100" ng-disabled="!t.metric_tags[k]"> 199 </div> 200 </div> 201 </form> 202 </div> 203 </div> 204 </div> 205 </div> 206 </div> 207 <div class="row" ng-show="running"> 208 <div class="col-lg-12"> 209 <div class="alert alert-info" ng-bind="running"></div> 210 </div> 211 </div> 212 <div class="row" ng-show="warning"> 213 <div class="col-lg-12"> 214 <div class="alert alert-warning" ng-bind="warning"></div> 215 </div> 216 </div> 217 <div class="row" ng-show="error"> 218 <div class="col-lg-12"> 219 <div class="alert alert-danger" ng-bind="error"></div> 220 </div> 221 </div> 222 <div class="row"> 223 <div class="col-lg-12"> 224 <div id="chart" ts-graph data="result" annotation="annotation" annotations="annotations" annotate-enabled="annotateEnabled" show-annotations="showAnnotations" height="400" bstart="start" bend="end" enable-brush="true" min="min" max="max" normalize="normalize"></div> 225 </div> 226 </div> 227 <div class="row" ng-show="queries"> 228 <div class="col-lg-12"> 229 <h4>Queries</h4> 230 <table class="table"> 231 <tbody> 232 <tr ng-show="queries.length > 1"> 233 <td>All</td> 234 <td><a href="/expr?expr={{btoa(exprText)}}{{queryTime}}" target="_blank" tabindex="6">Expression</a></td> 235 <td><a href="/config?expr={{btoa(exprText)}}" target="_blank" tabindex="6">Rule</a></td> 236 </tr> 237 <tr ng-repeat="q in queries"> 238 <td ng-bind="q"></td> 239 <td><a href="/expr?expr={{btoa(q)}}{{queryTime}}" target="_blank" tabindex="6">Expression</a></td> 240 <td><a href="/config?expr={{btoa('avg(' + q + ')')}}" target="_blank" tabindex="6">Rule</a></td> 241 </tr> 242 </tbody> 243 </table> 244 </div> 245 </div> 246 <div class="row"> 247 <div class="col-lg-12"> 248 <h4>Metric Description</h4> 249 <div ng-repeat="(k, v) in meta"> 250 <h5>{{k}}</h5> 251 {{v.Desc}} 252 </div> 253 </div> 254 </div> 255 <div class="row"> 256 <div class="col-lg-12"> 257 <p class="text-right"><small>OpenTSDB Version {{version.Major}}.{{version.Minor}}</small></p> 258 </div> 259 </div> 260 261 <a data-toggle="modal" data-target="#annotationModal" id="modalShower"></a> 262 <div class="modal" id="annotationModal" tabindex="-1" role="dialog"> 263 <div class="modal-dialog" role="document"> 264 <div class="modal-content"> 265 <div class="modal-header"> 266 <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button> 267 <h4 class="modal-title" id="annotationModalLabel">Annotation</h4> 268 </div> 269 <div class="modal-body"> 270 <form class="form-horizontal"> 271 <div class="form-group"> 272 <label class="col-sm-2 control-label" ng-click="switch()">StartDate</label> 273 <div class="col-sm-6"> 274 <input type="text" class="form-control" ng-model="annotation.StartDate"> 275 <p class="help-block">Format: YYYY-MM-DDTHH:mm:ssZ (RFC3339). If StartDate and EndDate are blank, the time is set to now. If one of the two is blank, the blank field will be set to the time of the other.</p> 276 </div> 277 </div> 278 <div class="form-group"> 279 <label class="col-sm-2 control-label" ng-click="switch()">EndDate</label> 280 <div class="col-sm-6"> 281 <input type="text" class="form-control" ng-model="annotation.EndDate"> 282 </div> 283 </div> 284 <div class="form-group"> 285 <label class="col-sm-2 control-label">CreationUser</label> 286 <div class="col-sm-6"> 287 <username-input></username-input> 288 </div> 289 </div> 290 <div class="form-group"> 291 <label class="col-sm-2 control-label">Url</label> 292 <div class="col-sm-6"> 293 <input type="text" class="form-control" ng-model="annotation.Url"> 294 </div> 295 </div> 296 <div class="form-group"> 297 <label class="col-sm-2 control-label">Host</label> 298 <div class="col-sm-6"> 299 <input type="text" class="form-control" ng-model="annotation.Host" bs-options="h for h in hosts" bs-typeahead> 300 </div> 301 </div> 302 <div class="form-group"> 303 <label class="col-sm-2 control-label">Owner</label> 304 <div class="col-sm-6"> 305 <input type="text" class="form-control" ng-model="annotation.Owner" bs-options="o for o in owners" bs-typeahead> 306 </div> 307 </div> 308 <div class="form-group"> 309 <label class="col-sm-2 control-label">Category</label> 310 <div class="col-sm-6"> 311 <input type="text" class="form-control" ng-model="annotation.Category" bs-options="c for c in categories" bs-typeahead> 312 </div> 313 </div> 314 <div class="form-group"> 315 <label class="col-sm-2 control-label">Message</label> 316 <div class="col-sm-10"> 317 <textarea class="form-control" ng-model="annotation.Message"></textarea> 318 </div> 319 </div> 320 <div ng-show="annotation.Id != ''">Editing Annotation</div> 321 </form> 322 </div> 323 <div class="modal-footer"> 324 <button type="button" class="btn btn-danger" ng-click="deleteAnnotation()" data-dismiss="modal" >Delete</button> 325 <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> 326 <button type="button" class="btn btn-primary" ng-click="submitAnnotation()" data-dismiss="modal">Save changes</button> 327 </div> 328 </div> 329 </div> 330 </div>