mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 05:29:42 -06:00
fix(annotations): updated annotations query editor
This commit is contained in:
parent
9eabd956b7
commit
3f05b4bb1e
@ -76,21 +76,23 @@
|
||||
<select class="gf-form-input gf-size-auto" ng-model="currentAnnotation.datasource" ng-options="f.name as f.name for f in datasources" ng-change="datasourceChanged()"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gf-form-inline last-row">
|
||||
<div class="gf-form-inline">
|
||||
<div class="gf-form gf-size-max-xl">
|
||||
<span class="gf-form-label width-10">Icon size</span>
|
||||
<select class="gf-form-input gf-size-md" ng-model="currentAnnotation.iconSize" ng-options="f for f in [7,8,9,10,13,15,17,20,25,30]"></select>
|
||||
</div>
|
||||
<div class="gf-form max-width-10">
|
||||
<div class="gf-form">
|
||||
<label class="gf-form-label">
|
||||
<span>Icon color</span>
|
||||
<spectrum-picker ng-model="currentAnnotation.iconColor"></spectrum-picker>
|
||||
<span class="checkbox-label">Icon color</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="gf-form max-width-10">
|
||||
<editor-checkbox text="Grid line" model="currentAnnotation.showLine"></editor-checkbox>
|
||||
</div>
|
||||
<div class="gf-form max-width-10">
|
||||
<div class="gf-form">
|
||||
<label class="gf-form-label">
|
||||
<span>Line color</span>
|
||||
<spectrum-picker ng-model="currentAnnotation.lineColor"></spectrum-picker>
|
||||
<span class="checkbox-label">Line color</span>
|
||||
</label>
|
||||
<editor-checkbox text="Grid line" model="currentAnnotation.showLine"></editor-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<div class="gf-form-group">
|
||||
<div class="gf-form">
|
||||
<span class="gf-form-label width-14">Graphite target expression</span>
|
||||
<input type="text" class="gf-form-input max-width-20" ng-model='ctrl.annotation.target' placeholder=""></input>
|
||||
<span class="gf-form-label width-13">Graphite metrics query</span>
|
||||
<input type="text" class="gf-form-input" ng-model='ctrl.annotation.target' placeholder=""></input>
|
||||
</div>
|
||||
<div class="gf-form">
|
||||
<span class="gf-form-label width-14">Graphite event tags</span>
|
||||
<input type="text" class="gf-form-input max-width-20" ng-model='ctrl.annotation.tags' placeholder=""></input>
|
||||
<span class="gf-form-label width-13">Or Graphite events query</span>
|
||||
<input type="text" class="gf-form-input" ng-model='ctrl.annotation.tags' placeholder=""></input>
|
||||
</div>
|
||||
</div>
|
@ -85,6 +85,10 @@ export function InfluxDatasource(instanceSettings, $q, backendSrv, templateSrv)
|
||||
};
|
||||
|
||||
this.annotationQuery = function(options) {
|
||||
if (!options.annotation.query) {
|
||||
return $q.reject({message: 'Query missing in annotation definition'});
|
||||
}
|
||||
|
||||
var timeFilter = getTimeFilter({rangeRaw: options.rangeRaw});
|
||||
var query = options.annotation.query.replace('$timeFilter', timeFilter);
|
||||
query = templateSrv.replace(query);
|
||||
|
@ -286,8 +286,3 @@ div.flot-text {
|
||||
}
|
||||
}
|
||||
|
||||
.annotations-basic-settings {
|
||||
.last-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,8 @@ $easing: cubic-bezier(0, 0, 0.265, 1.00);
|
||||
display: block;
|
||||
}
|
||||
|
||||
&.drop-open.drop-popover.drop-out-of-bounds,
|
||||
&.drop-open-transitionend.drop-popover.drop-out-of-bounds {
|
||||
&.drop-open.drop-help.drop-out-of-bounds,
|
||||
&.drop-open-transitionend.drop-help.drop-out-of-bounds {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +60,7 @@
|
||||
position: relative;
|
||||
@include left-brand-border();
|
||||
|
||||
&.active,
|
||||
&:hover {
|
||||
background-color: $side-menu-item-hover-bg;
|
||||
@include left-brand-border-gradient();
|
||||
|
Loading…
Reference in New Issue
Block a user