fix(annotations): updated annotations query editor

This commit is contained in:
Torkel Ödegaard 2016-02-22 14:54:19 +01:00
parent 9eabd956b7
commit 3f05b4bb1e
6 changed files with 23 additions and 21 deletions

View File

@ -76,22 +76,24 @@
<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">
<spectrum-picker ng-model="currentAnnotation.iconColor"></spectrum-picker>
<span class="checkbox-label">Icon color</span>
<div class="gf-form">
<label class="gf-form-label">
<span>Icon color</span>
<spectrum-picker ng-model="currentAnnotation.iconColor"></spectrum-picker>
</label>
</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>
</label>
<editor-checkbox text="Grid line" model="currentAnnotation.showLine"></editor-checkbox>
</div>
<div class="gf-form max-width-10">
<spectrum-picker ng-model="currentAnnotation.lineColor"></spectrum-picker>
<span class="checkbox-label">Line color</span>
</div>
</div>
</div>

View File

@ -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>
</div>

View File

@ -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);

View File

@ -286,8 +286,3 @@ div.flot-text {
}
}
.annotations-basic-settings {
.last-row {
margin-bottom: 20px;
}
}

View File

@ -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;
}
}

View File

@ -60,6 +60,7 @@
position: relative;
@include left-brand-border();
&.active,
&:hover {
background-color: $side-menu-item-hover-bg;
@include left-brand-border-gradient();