mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 23:55:47 -06:00
Search: max_results config.js option & scroll in search results (To show more or all dashboards), Closes #631
This commit is contained in:
parent
14f09e3787
commit
d056b1f1e1
@ -13,6 +13,7 @@
|
||||
- [Issue #266](https://github.com/grafana/grafana/issues/266). Graphite: New option cacheTimeout to override graphite default memcache timeout
|
||||
- [Issue #606](https://github.com/grafana/grafana/issues/606). General: New global option in config.js to specify admin password (useful to hinder users from accidentally make changes)
|
||||
- [Issue #201](https://github.com/grafana/grafana/issues/201). Annotations: Elasticsearch datasource support for events
|
||||
- [Issue #631](https://github.com/grafana/grafana/issues/631). Search: max_results config.js option & scroll in search results (To show more or all dashboards)
|
||||
|
||||
**Changes**
|
||||
- [Issue #536](https://github.com/grafana/grafana/issues/536). Graphite: Use unix epoch for Graphite from/to for absolute time ranges
|
||||
|
@ -19,7 +19,8 @@ function (_, crypto) {
|
||||
default_route : '/dashboard/file/default.json',
|
||||
playlist_timespan : "1m",
|
||||
unsaved_changes_warning : true,
|
||||
admin: {}
|
||||
search : { max_results: 20 },
|
||||
admin : {}
|
||||
};
|
||||
|
||||
// This initializes a new hash on purpose, to avoid adding parameters to
|
||||
|
@ -60,6 +60,7 @@
|
||||
</table>
|
||||
|
||||
<table class="table table-condensed table-striped" ng-if="!tagsOnly">
|
||||
<tbody style="max-height: 570px; overflow: auto; display: block">
|
||||
<tr bindonce ng-repeat="row in results.metrics"
|
||||
class="grafana-search-metric-result"
|
||||
ng-class="{'selected': $index === selectedIndex }">
|
||||
@ -88,6 +89,7 @@
|
||||
</td>
|
||||
<td><a><i class="icon-share" ng-click="shareDashboard(row._id, row._id)" config-modal="app/partials/dashLoaderShare.html"></i></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -23,6 +23,7 @@ function (angular, _, $, config, kbn, moment) {
|
||||
this.index = datasource.index;
|
||||
this.grafanaDB = datasource.grafanaDB;
|
||||
this.annotationEditorSrc = 'app/partials/elasticsearch/annotation_editor.html';
|
||||
this.searchMaxResults = config.search.max_results || 20;
|
||||
}
|
||||
|
||||
ElasticDatasource.prototype._request = function(method, url, index, data) {
|
||||
@ -198,7 +199,7 @@ function (angular, _, $, config, kbn, moment) {
|
||||
var query = {
|
||||
query: { query_string: { query: queryString } },
|
||||
facets: { tags: { terms: { field: "tags", order: "term", size: 50 } } },
|
||||
size: 20,
|
||||
size: this.searchMaxResults,
|
||||
sort: ["_uid"]
|
||||
};
|
||||
|
||||
@ -208,7 +209,7 @@ function (angular, _, $, config, kbn, moment) {
|
||||
return { dashboards: [], tags: [] };
|
||||
}
|
||||
|
||||
return { dashboards: results.hits.hits, tags: results.facets.terms };
|
||||
return { dashboards: results.hits.hits, tags: results.facets.terms || [] };
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -9,7 +9,9 @@ function (Settings) {
|
||||
|
||||
return new Settings({
|
||||
|
||||
// datasources, you can add multiple
|
||||
// datasources
|
||||
// Delete the ones you do not want
|
||||
// grafanaDB: true marks the datasource for use as dashboard storage
|
||||
datasources: {
|
||||
graphite: {
|
||||
type: 'graphite',
|
||||
@ -22,19 +24,23 @@ function (Settings) {
|
||||
username: 'admin',
|
||||
password: 'admin'
|
||||
},
|
||||
// elasticsearch, used for storing and loading dashboards, annotations
|
||||
// For Basic authentication use: http://username:password@domain.com:9200
|
||||
elasticsearch: {
|
||||
type: 'elasticsearch',
|
||||
url: "http://"+window.location.hostname+":9200"
|
||||
index: 'grafana-dash', // index for storing dashboards
|
||||
grafanaDB: true,
|
||||
}
|
||||
},
|
||||
|
||||
// elasticsearch url
|
||||
// used for storing and loading dashboards, optional
|
||||
// For Basic authentication use: http://username:password@domain.com:9200
|
||||
elasticsearch: "http://"+window.location.hostname+":9200",
|
||||
search: {
|
||||
max_results: 20
|
||||
},
|
||||
|
||||
// default start dashboard
|
||||
default_route: '/dashboard/file/default.json',
|
||||
|
||||
// Elasticsearch index for storing dashboards
|
||||
grafana_index: "grafana-dash",
|
||||
|
||||
// set to false to disable unsaved changes warning
|
||||
unsaved_changes_warning: true,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user