Переглянути джерело

Merge branch 'master' of github.com:torkelo/grafana-private into pro

Torkel Ödegaard 11 роки тому
батько
коміт
ef351bb9a3

+ 2 - 2
src/app/partials/search.html

@@ -45,7 +45,7 @@
           </span>
         </div>
 
-        <h6 ng-hide="results.dashboards.length || results.metrics.length">No dashboards or metrics matching your query found</h6>
+        <h6 ng-hide="results.dashboards.length">No dashboards matching your query were found.</h6>
 
         <div class="search-results-container" ng-if="tagsOnly">
 					<div ng-repeat="tag in results.tags"
@@ -81,7 +81,7 @@
 
 							<a class="search-result-link">
 								<i class="icon icon-th-large"></i>
-								<span bo-text="row.id"></span>
+								<span bo-text="row.title"></span>
 							</a>
 
 					</div>

+ 2 - 0
src/app/routes/dashboard-from-db.js

@@ -16,10 +16,12 @@ function (angular) {
       .when('/dashboard/elasticsearch/:id', {
         templateUrl: 'app/partials/dashboard.html',
         controller : 'DashFromDBProvider',
+        reloadOnSearch: false,
       })
       .when('/dashboard/temp/:id', {
         templateUrl: 'app/partials/dashboard.html',
         controller : 'DashFromDBProvider',
+        reloadOnSearch: false,
       });
   });
 

+ 1 - 0
src/app/routes/dashboard-from-file.js

@@ -14,6 +14,7 @@ function (angular, $, config, _) {
       .when('/dashboard/file/:jsonFile', {
         templateUrl: 'app/partials/dashboard.html',
         controller : 'DashFromFileProvider',
+        reloadOnSearch: false,
       });
   });
 

+ 2 - 1
src/app/services/dashboard/dashboardSrv.js

@@ -19,7 +19,9 @@ function (angular, $, kbn, _, moment) {
         data = {};
       }
 
+      this.id = data.id || null;
       this.title = data.title || 'No Title';
+      this.originalTitle = this.title;
       this.tags = data.tags || [];
       this.style = data.style || "dark";
       this.timezone = data.timezone || 'browser';
@@ -31,7 +33,6 @@ function (angular, $, kbn, _, moment) {
       this.templating = data.templating || { list: [] };
       this.refresh = data.refresh;
       this.version = data.version || 0;
-      this.$state = data.$state;
 
       if (this.nav.length === 0) {
         this.nav.push({ type: 'timepicker' });

+ 1 - 0
src/app/services/elasticsearch/es-datasource.js

@@ -216,6 +216,7 @@ function (angular, _, $, config, kbn, moment) {
           for (var i = 0; i < results.hits.hits.length; i++) {
             hits.dashboards.push({
               id: results.hits.hits[i]._id,
+              title: results.hits.hits[i]._id,
               tags: results.hits.hits[i]._source.tags
             });
           }

+ 1 - 0
src/app/services/influxdb/influxdbDatasource.js

@@ -358,6 +358,7 @@ function (angular, _, kbn, InfluxSeries) {
         for (var i = 0; i < results.length; i++) {
           var hit =  {
             id: results[i].points[0][dashCol],
+            title: results[i].points[0][dashCol],
             tags: results[i].points[0][tagsCol].split(",")
           };
           hit.tags = hit.tags[0] ? hit.tags : [];