Rashid Khan 13 лет назад
Родитель
Сommit
be7c530c57
2 измененных файлов с 22 добавлено и 20 удалено
  1. 1 1
      config.js
  2. 21 19
      panels/stringquery/module.html

+ 1 - 1
config.js

@@ -13,7 +13,7 @@ If you need to configure the default dashboard, please see dashboard.js
 */
 var config = new Settings(
 {
-    elasticsearch:  'http://demo.logstash.net:9200',
+    elasticsearch:  'http://localhost:9200',
     timeformat:     'mm/dd HH:MM:ss',
     modules:        ['histogram','map','pie','table','stringquery','sort',
                     'timepicker','text','fields','hits','dashcontrol'], 

+ 21 - 19
panels/stringquery/module.html

@@ -1,28 +1,30 @@
 <kibana-panel ng-controller='stringquery'>
   <div ng-show="!panel.multi">
-    <table class="form-horizontal">
-      <tr><td><label><small>{{panel.label}}</small></label></td></tr>
-      <tr>
-        <td width="97%" style="padding-right:20px">
-          <input type="text" style="width:100%" ng-model="panel.query">
-        </td>
-        <td style="margin-left:20px" width="1%">
-          <button style="margin-top:0px" type="submit" class="btn btn-info" ng-click="send_query(panel.query)"><i class="icon-search"></i></button>
-        </td>
-        <td width="1%">
-          <button style="margin-top:0px"  type="submit" class="btn btn-danger" ng-click="panel.query='';send_query(panel.query)"><i class="icon-ban-circle"></i></button>
-        </td>
-        <td width="1%">
-          <button style="margin-top:0px"  ng-show="panel.multi" type="submit" class="btn" ng-click="add_query()"><i class="icon-plus"></i></button>
-        </td>
-      <tr>
-    </table>
+    <form>
+      <table class="form-horizontal">
+        <tr><td><label><small>{{panel.label}}</small></label></td></tr>
+        <tr>
+          <td width="97%" style="padding-right:20px">
+            <input type="text" style="width:100%" ng-model="panel.query">
+          </td>
+          <td style="margin-left:20px" width="1%">
+            <button style="margin-top:0px" type="submit" class="btn btn-info" ng-click="send_query(panel.query)"><i class="icon-search"></i></button>
+          </td>
+          <td width="1%">
+            <button style="margin-top:0px"  type="submit" class="btn btn-danger" ng-click="panel.query='';send_query(panel.query)"><i class="icon-ban-circle"></i></button>
+          </td>
+          <td width="1%">
+            <button style="margin-top:0px"  ng-show="panel.multi" type="submit" class="btn" ng-click="add_query()"><i class="icon-plus"></i></button>
+          </td>
+        <tr>
+      </table>
+    </form>
   </div>
   <div class='row-fluid' ng-show="panel.multi && panel.multi_arrange == 'horizontal'">
-      <form ng-class="{'form-inline': panel.multi_arrange == 'horizontal'}" style="width:100%;" >        
+      <form class="form-inline" style="width:100%;" >        
         <span ng-repeat="q in panel.query">
           <span class="input-append" style="margin-bottom:0px;margin-right:5px">
-            <button class="btn btn-danger" type="submit" style="width:50px;margin-left:-50px;visibility:hidden" ng-click="send_query(panel.query)"></button>
+            <button class="btn btn-danger" type="submit" style="width:50px;margin-left:-50px;visibility:hidden"></button>
             <input style="margin-bottom:5px;" type="text"  ng-model="panel.query[$index]" ng-model-onblur style="width:90%">
             <button class="btn btn-danger" ng-show="panel.query.length > 1" ng-click="remove_query($index);send_query(panel.query)"><i class="icon-minus"></i></button><br>
           </span>