Skip to content

Commit b841e64

Browse files
committed
Merge branch 'master' into alerting_influxdb
2 parents f609623 + 9184819 commit b841e64

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

public/app/core/directives/metric_segment.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function (_, $, coreModule) {
4343
var selected = _.find($scope.altSegments, {value: value});
4444
if (selected) {
4545
segment.value = selected.value;
46-
segment.html = selected.html;
46+
segment.html = selected.html || selected.value;
4747
segment.fake = false;
4848
segment.expandable = selected.expandable;
4949
}
@@ -186,27 +186,26 @@ function (_, $, coreModule) {
186186

187187
$scope.getOptionsInternal = function() {
188188
if ($scope.options) {
189-
cachedOptions = _.map($scope.options, function(option) {
190-
return uiSegmentSrv.newSegment({value: option.text});
191-
});
192-
return $q.when(cachedOptions);
189+
cachedOptions = $scope.options;
190+
return $q.when(_.map($scope.options, function(option) {
191+
return {value: option.text};
192+
}));
193193
} else {
194194
return $scope.getOptions().then(function(options) {
195-
cachedOptions =_.map(options, function(option) {
195+
cachedOptions = options;
196+
return _.map(options, function(option) {
196197
if (option.html) {
197198
return option;
198199
}
199-
return uiSegmentSrv.newSegment({value: option.text});
200+
return {value: option.text};
200201
});
201-
return cachedOptions;
202202
});
203203
}
204204
};
205205

206206
$scope.onSegmentChange = function() {
207-
208207
if (cachedOptions) {
209-
var option = _.find(cachedOptions, {value: $scope.segment.value});
208+
var option = _.find(cachedOptions, {text: $scope.segment.value});
210209
if (option && option.value !== $scope.property) {
211210
$scope.property = option.value;
212211
} else if (attrs.custom !== 'false') {

public/app/features/plugins/import_list/import_list.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,18 @@
1414
</span>
1515
</td>
1616
<td>
17-
<span ng-if="dash.imported" bs-tooltip='"Imported revision:" + dash.importedRevision'>
17+
<span>
1818
Revision: {{dash.revision}}
19+
<span ng-if="dash.imported" class="small">(Imported: {{dash.importedRevision}})</span>
1920
<span>
2021
</td>
2122
<td style="text-align: right">
2223
<button class="btn btn-secondary btn-small" ng-click="ctrl.import(dash, false)" ng-show="!dash.imported">
2324
Import
2425
</button>
2526
<button class="btn btn-secondary btn-small" ng-click="ctrl.import(dash, true)" ng-show="dash.imported">
26-
Update
27+
<span ng-if="dash.revision !== dash.importedRevision">Update</span>
28+
<span ng-if="dash.revision === dash.importedRevision">Re-import</span>
2729
</button>
2830
<button class="btn btn-danger btn-small" ng-click="ctrl.remove(dash)" ng-show="dash.imported">
2931
<i class="fa fa-trash"></i>

public/app/plugins/datasource/elasticsearch/query_def.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function (_) {
2222
bucketAggTypes: [
2323
{text: "Terms", value: 'terms', requiresField: true},
2424
{text: "Filters", value: 'filters' },
25-
{text: "Geo Hash Grid", value: 'geohash_grid', requiresField: true},
25+
{text: "Geo Hash Grid", value: 'geohash_grid', requiresField: true},
2626
{text: "Date Histogram", value: 'date_histogram', requiresField: true},
2727
],
2828

0 commit comments

Comments
 (0)