Przeglądaj źródła

Set placeholder for es save to dashboard title by default, add notice when no indices match

Rashid Khan 12 lat temu
rodzic
commit
094226f638

+ 1 - 1
src/app/partials/dashLoader.html

@@ -67,7 +67,7 @@
     <li ng-show="loader.save_elasticsearch">
     <li ng-show="loader.save_elasticsearch">
       <h5>Elasticsearch</h5>
       <h5>Elasticsearch</h5>
       <form class="input-append">
       <form class="input-append">
-        <input class='input-medium' placeholder='Title' type="text" ng-model="elasticsearch.title"/>
+        <input class='input-medium' placeholder="{{dashboard.current.title}}" type="text" ng-model="elasticsearch.title"/>
         <button class="btn" ng-click="elasticsearch_save('dashboard')"><i class="icon-save"></i></button>
         <button class="btn" ng-click="elasticsearch_save('dashboard')"><i class="icon-save"></i></button>
       </form>
       </form>
     </li>
     </li>

+ 3 - 1
src/app/services/dashboard.js

@@ -116,12 +116,14 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
             if(p.length > 0) {
             if(p.length > 0) {
               self.indices = p;
               self.indices = p;
             } else {
             } else {
-              //TODO: Option to not failover
+              // Option to not failover
               if(self.current.failover) {
               if(self.current.failover) {
                 self.indices = [self.current.index.default];
                 self.indices = [self.current.index.default];
               } else {
               } else {
                 // Do not issue refresh if no indices match. This should be removed when panels
                 // Do not issue refresh if no indices match. This should be removed when panels
                 // properly understand when no indices are present
                 // properly understand when no indices are present
+                alertSrv.set('No results','There were no results because no indices were found that match your'+
+                  ' selected time span','info',5000);
                 return false;
                 return false;
               }
               }
             }
             }