compass-web/app/dash/app/panels/annotations/editor.html

1 line
2.8 KiB
HTML

<div bindonce="" class="modal-body"><div class="pull-right editor-title">Annotations</div><div class="editor-row"><table class="table table-striped annotation-editor-table" style="width: 700px"><thead><th width="90%">Name</th><th width="1%"></th><th width="1%"></th><th width="1%"></th></thead><tr ng-repeat="annotation in panel.annotations"><td><a ng-click="edit(annotation)" bs-tooltip="'Click to edit'"><i class="icon-cog"></i> {{annotation.name}}</a></td><td><i ng-click="_.move(panel.annotations,$index,$index-1)" ng-hide="$first" class="pointer icon-arrow-up"></i></td><td><i ng-click="_.move(panel.annotations,$index,$index+1)" ng-hide="$last" class="pointer icon-arrow-down"></i></td><td><i ng-click="panel.annotations = _.without(panel.annotations, annotation)" class="pointer icon-remove"></i></td></tr></table></div><div class="editor-row"><h4 ng-show="currentIsNew">Add Annotation</h4><h4 ng-show="!currentIsNew">Edit Annotation</h4><div class="editor-option"><label class="small">Name</label><input type="text" class="input-medium" ng-model="currentAnnnotation.name" placeholder="name"></div><div class="editor-option"><label class="small">Type</label><select ng-model="currentAnnnotation.type" ng-options="f for f in ['graphite metric', 'graphite events']"></select></div><div class="editor-option"><label class="small">Icon color</label><spectrum-picker ng-model="currentAnnnotation.iconColor"></spectrum-picker></div><div class="editor-option"><label class="small">Icon size</label><select class="input-mini" ng-model="currentAnnnotation.iconSize" ng-options="f for f in [7,8,9,10,13,15,17,20,25,30]"></select></div><div class="editor-option"><label class="small">Grid line</label><input type="checkbox" ng-model="currentAnnnotation.showLine" ng-checked="currentAnnnotation.showLine"></div><div class="editor-option"><label class="small">Line color</label><spectrum-picker ng-model="currentAnnnotation.lineColor"></spectrum-picker></div></div><div class="editor-row" ng-if="currentAnnnotation.type === 'graphite metric'"><div class="editor-option"><label class="small">Graphite target expression</label><input type="text" class="span10" ng-model="currentAnnnotation.target" placeholder=""></div></div><div class="editor-row" ng-if="currentAnnnotation.type === 'graphite events'"><div class="editor-option"><label class="small">Graphite event tags</label><input type="text" ng-model="currentAnnnotation.tags" placeholder=""></div></div></div><div class="modal-footer"><button ng-show="currentIsNew" type="button" class="btn btn-success" ng-click="add()">Add annotation</button> <button ng-show="!currentIsNew" type="button" class="btn btn-success" ng-click="update()">Update</button> <button type="button" class="btn btn-danger" ng-click="close_edit();dismiss();dashboard.refresh();">Close</button></div>