mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
annotations: removing wip stuff so I can merge to master
This commit is contained in:
parent
0bae7212f6
commit
456b07b766
@ -77,17 +77,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="gf-form-group">
|
<div class="gf-form-group">
|
||||||
<div class="gf-form-inline">
|
<div class="gf-form-inline">
|
||||||
<div class="gf-form">
|
<!-- <div class="gf-form"> -->
|
||||||
<span class="gf-form-label width-7">Show in</span>
|
<!-- <span class="gf-form-label width-7">Show in</span> -->
|
||||||
<div class="gf-form-select-wrapper width-12">
|
<!-- <div class="gf-form-select-wrapper width-12"> -->
|
||||||
<select class="gf-form-input" ng-model="ctrl.currentAnnotation.showIn" ng-options="f.value as f.text for f in ctrl.showOptions"></select>
|
<!-- <select class="gf-form-input" ng-model="ctrl.currentAnnotation.showIn" ng-options="f.value as f.text for f in ctrl.showOptions"></select> -->
|
||||||
</div>
|
<!-- </div> -->
|
||||||
</div>
|
<!-- </div> -->
|
||||||
<gf-form-switch class="gf-form"
|
<gf-form-switch class="gf-form"
|
||||||
label="Hide toggle"
|
label="Hide toggle"
|
||||||
tooltip="Hides the annotation query toggle from showing at the top of the dashboard"
|
tooltip="Hides the annotation query toggle from showing at the top of the dashboard"
|
||||||
checked="ctrl.currentAnnotation.hide"
|
checked="ctrl.currentAnnotation.hide"
|
||||||
label-class="width-9">
|
label-class="width-7">
|
||||||
</gf-form-switch>
|
</gf-form-switch>
|
||||||
</div>
|
</div>
|
||||||
<div class="gf-form">
|
<div class="gf-form">
|
||||||
|
@ -592,9 +592,9 @@ coreModule.directive('grafanaGraph', function($rootScope, timeSrv, popoverSrv) {
|
|||||||
|
|
||||||
elem.bind("plotselected", function (event, ranges) {
|
elem.bind("plotselected", function (event, ranges) {
|
||||||
if (ranges.ctrlKey || ranges.metaKey) {
|
if (ranges.ctrlKey || ranges.metaKey) {
|
||||||
scope.$apply(() => {
|
// scope.$apply(() => {
|
||||||
eventManager.updateTime(ranges.xaxis);
|
// eventManager.updateTime(ranges.xaxis);
|
||||||
});
|
// });
|
||||||
} else {
|
} else {
|
||||||
scope.$apply(function() {
|
scope.$apply(function() {
|
||||||
timeSrv.setTime({
|
timeSrv.setTime({
|
||||||
@ -610,9 +610,9 @@ coreModule.directive('grafanaGraph', function($rootScope, timeSrv, popoverSrv) {
|
|||||||
// Skip if range selected (added in "plotselected" event handler)
|
// Skip if range selected (added in "plotselected" event handler)
|
||||||
let isRangeSelection = pos.x !== pos.x1;
|
let isRangeSelection = pos.x !== pos.x1;
|
||||||
if (!isRangeSelection) {
|
if (!isRangeSelection) {
|
||||||
scope.$apply(() => {
|
// scope.$apply(() => {
|
||||||
eventManager.updateTime({from: pos.x, to: null});
|
// eventManager.updateTime({from: pos.x, to: null});
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -144,7 +144,6 @@ class GraphCtrl extends MetricsPanelCtrl {
|
|||||||
actions.push({text: 'Export CSV (series as rows)', click: 'ctrl.exportCsv()'});
|
actions.push({text: 'Export CSV (series as rows)', click: 'ctrl.exportCsv()'});
|
||||||
actions.push({text: 'Export CSV (series as columns)', click: 'ctrl.exportCsvColumns()'});
|
actions.push({text: 'Export CSV (series as columns)', click: 'ctrl.exportCsvColumns()'});
|
||||||
actions.push({text: 'Toggle legend', click: 'ctrl.toggleLegend()'});
|
actions.push({text: 'Toggle legend', click: 'ctrl.toggleLegend()'});
|
||||||
actions.push({ text: 'Add Annotation', click: 'ctrl.enableAddAnnotationMode()' });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
issueQueries(datasource) {
|
issueQueries(datasource) {
|
||||||
@ -301,11 +300,6 @@ class GraphCtrl extends MetricsPanelCtrl {
|
|||||||
this.refresh();
|
this.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
enableAddAnnotationMode() {
|
|
||||||
// placehoder for some other way to teach users
|
|
||||||
alert('selection region while holding down CTRL or CMD');
|
|
||||||
}
|
|
||||||
|
|
||||||
legendValuesOptionChanged() {
|
legendValuesOptionChanged() {
|
||||||
var legend = this.panel.legend;
|
var legend = this.panel.legend;
|
||||||
legend.values = legend.min || legend.max || legend.avg || legend.current || legend.total;
|
legend.values = legend.min || legend.max || legend.avg || legend.current || legend.total;
|
||||||
|
Loading…
Reference in New Issue
Block a user