mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'master' of github.com:grafana/grafana
This commit is contained in:
@@ -105,6 +105,11 @@ function (angular, _, coreModule, config) {
|
||||
});
|
||||
}
|
||||
|
||||
// for Prometheus
|
||||
if (!err.data.message && _.isString(err.data.error)) {
|
||||
err.data.message = err.data.error;
|
||||
}
|
||||
|
||||
throw err;
|
||||
});
|
||||
};
|
||||
|
||||
@@ -34,11 +34,12 @@ var rangeOptions = [
|
||||
{ from: 'now-15m', to: 'now', display: 'Last 15 minutes', section: 3 },
|
||||
{ from: 'now-30m', to: 'now', display: 'Last 30 minutes', section: 3 },
|
||||
{ from: 'now-1h', to: 'now', display: 'Last 1 hour', section: 3 },
|
||||
{ from: 'now-3h', to: 'now', display: 'Last 3 hours', section: 3 },
|
||||
{ from: 'now-6h', to: 'now', display: 'Last 6 hours', section: 3 },
|
||||
{ from: 'now-12h', to: 'now', display: 'Last 12 hours', section: 3 },
|
||||
{ from: 'now-24h', to: 'now', display: 'Last 24 hours', section: 3 },
|
||||
{ from: 'now-7d', to: 'now', display: 'Last 7 days', section: 3 },
|
||||
|
||||
{ from: 'now-7d', to: 'now', display: 'Last 7 days', section: 0 },
|
||||
{ from: 'now-30d', to: 'now', display: 'Last 30 days', section: 0 },
|
||||
{ from: 'now-60d', to: 'now', display: 'Last 60 days', section: 0 },
|
||||
{ from: 'now-90d', to: 'now', display: 'Last 90 days', section: 0 },
|
||||
@@ -133,8 +134,12 @@ _.each(rangeOptions, function (frame) {
|
||||
return from.fromNow() + ' to ' + formatDate(range.to);
|
||||
}
|
||||
|
||||
var res = describeTextRange(range.from);
|
||||
return res.display;
|
||||
if (range.to.toString() === 'now') {
|
||||
var res = describeTextRange(range.from);
|
||||
return res.display;
|
||||
}
|
||||
|
||||
return range.from.toString() + ' to ' + range.to.toString();
|
||||
}
|
||||
|
||||
export = {
|
||||
|
||||
@@ -146,6 +146,23 @@
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="tight-form">
|
||||
<ul class="tight-form-list">
|
||||
<li class="tight-form-item" style="width: 100px;">
|
||||
<editor-checkbox text="All value" model="current.includeAll" change="runQuery()"></editor-checkbox>
|
||||
</li>
|
||||
<li ng-show="current.includeAll">
|
||||
<input type="text" class="input-xlarge tight-form-input" style="width:364px" ng-model='current.options[0].value'></input>
|
||||
</li>
|
||||
<li class="tight-form-item" ng-show="current.includeAll">
|
||||
All format
|
||||
</li>
|
||||
<li ng-show="current.includeAll">
|
||||
<select class="input-medium tight-form-input last" ng-model="current.allFormat" ng-change="runQuery()" ng-options="f for f in ['glob', 'wildcard', 'regex wildcard', 'regex values', 'lucene', 'pipe']"></select>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="current.type === 'query'">
|
||||
|
||||
@@ -115,6 +115,11 @@ function (angular, _, kbn) {
|
||||
if (variable.type === 'interval') {
|
||||
self.updateAutoInterval(variable);
|
||||
}
|
||||
|
||||
if (variable.type === 'custom' && variable.includeAll) {
|
||||
self.addAllOption(variable);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
this.updateOptions = function(variable) {
|
||||
|
||||
@@ -204,7 +204,7 @@ function (angular, _) {
|
||||
|
||||
return this.performEC2DescribeInstances(region, [], instanceIds).then(function(result) {
|
||||
var volumeIds = _.map(result.Reservations[0].Instances[0].BlockDeviceMappings, function(mapping) {
|
||||
return mapping.EBS.VolumeID;
|
||||
return mapping.Ebs.VolumeId;
|
||||
});
|
||||
|
||||
return transformSuggestData(volumeIds);
|
||||
|
||||
Reference in New Issue
Block a user