Bladeren bron

Updated default notes, fixed alert z-index, added time correction options for histogram

Rashid Khan 13 jaren geleden
bovenliggende
commit
1796323cb9
5 gewijzigde bestanden met toevoegingen van 521 en 20 verwijderingen
  1. 1 15
      common/css/main.css
  2. 508 0
      common/lib/panels/timezone.js
  3. 1 1
      default.json
  4. 6 2
      panels/histogram/editor.html
  5. 5 2
      panels/histogram/module.js

+ 1 - 15
common/css/main.css

@@ -17,7 +17,7 @@
 .panel-error {
 .panel-error {
   opacity: 0.9;
   opacity: 0.9;
   position:absolute;
   position:absolute;
-  z-index: 2000;
+  z-index: 1000;
 }
 }
 
 
 .panel i.editlink {
 .panel i.editlink {
@@ -44,20 +44,6 @@
   max-width: 500px;
   max-width: 500px;
 }
 }
 
 
-/*
-.row-header i.editlink {
-  opacity: 0;
-}
-
-.row-header:hover i.editlink {
-  opacity: 0.3;
-}
-
-.row-header i.editlink:hover {
-  opacity: 1;
-}
-*/
-
 .pointer {
 .pointer {
   cursor: pointer;
   cursor: pointer;
 }
 }

File diff suppressed because it is too large
+ 508 - 0
common/lib/panels/timezone.js


+ 1 - 1
default.json

@@ -14,7 +14,7 @@
           ],
           ],
           "type": "text",
           "type": "text",
           "title": "Welcome",
           "title": "Welcome",
-          "content": "Welcome to Kibana Dashboard, a technology preview of what's to come for Kibana, Logstash and Elasticsearch \n\nKibana dashboard is the easy way to share, build, use and extend interactive, real time dashboards and data analysis interfaces. \n\nReady to get started? \n\nLogstash users, click the 'Load' button to the right, paste this URL:  https://gist.github.com/anonymous/e99d94a426956c45a288 into the 'Gist' loader, click 'Get' and select the 'Logstash Dashboard' link that appears",
+          "content": "Welcome to Kibana Dashboard, a technology preview of what's to come for Kibana, Logstash and Elasticsearch \n\nKibana dashboard is the easy way to share, build, use and extend interactive, real time dashboards and data analysis interfaces. \n\nReady to get started? \n\nLogstash users, click the 'Load' button to the right, paste this URL:  https://gist.github.com/88a4b1f22e3212e45cf3 into the 'Gist' loader, click 'Get' and select the 'Logstash Dashboard' link that appears",
           "style": {
           "style": {
             "font-size": "14pt"
             "font-size": "14pt"
           }
           }

+ 6 - 2
panels/histogram/editor.html

@@ -36,8 +36,12 @@
     <label class="small">Chart Options</label> 
     <label class="small">Chart Options</label> 
     <select ng-change="$emit('render')" multiple style="width:95%" ng-model="panel.show" ng-options="f for f in ['bars','points','stack','lines','legend','x-axis','y-axis']"></select>
     <select ng-change="$emit('render')" multiple style="width:95%" ng-model="panel.show" ng-options="f for f in ['bars','points','stack','lines','legend','x-axis','y-axis']"></select>
   </div>
   </div>
-  <div class="span2">
-    <label class="small">Fill (0.0 - 1.0)</label> 
+  <div class="span3">
+    <label class="small">Line Fill (1 - 10)</label> 
     <input ng-change="$emit('render')" type="number" class="input-mini" ng-model="panel.fill">
     <input ng-change="$emit('render')" type="number" class="input-mini" ng-model="panel.fill">
   </div>
   </div>
+  <div class="span3">
+    <label class="small">Time correction</label> 
+    <select ng-change="$emit('render')" ng-model="panel.timezone" class='input-small' ng-options="f for f in ['browser','utc']"></select>
+  </div>
 </div>
 </div>

+ 5 - 2
panels/histogram/module.js

@@ -8,7 +8,8 @@ angular.module('kibana.histogram', [])
     query   : [ {query: "*", label:"Query"} ],
     query   : [ {query: "*", label:"Query"} ],
     interval: secondsToHms(calculate_interval($scope.from,$scope.to,40,0)/1000),
     interval: secondsToHms(calculate_interval($scope.from,$scope.to,40,0)/1000),
     show    : ['bars','y-axis','x-axis','legend'],
     show    : ['bars','y-axis','x-axis','legend'],
-    fill    : false,
+    fill    : 3,
+    timezone: 'browser', // browser, utc or a standard timezone
     group   : "default",
     group   : "default",
   }
   }
   _.defaults($scope.panel,_d)
   _.defaults($scope.panel,_d)
@@ -144,6 +145,7 @@ angular.module('kibana.histogram', [])
         var scripts = $LAB.script("common/lib/panels/jquery.flot.js")
         var scripts = $LAB.script("common/lib/panels/jquery.flot.js")
           .script("common/lib/panels/jquery.flot.time.js")
           .script("common/lib/panels/jquery.flot.time.js")
           .script("common/lib/panels/jquery.flot.stack.js")
           .script("common/lib/panels/jquery.flot.stack.js")
+          .script("common/lib/panels/timezone.js")
                     
                     
         // Populate element. Note that jvectormap appends, does not replace.
         // Populate element. Note that jvectormap appends, does not replace.
         scripts.wait(function(){
         scripts.wait(function(){
@@ -159,13 +161,14 @@ angular.module('kibana.histogram', [])
             },
             },
             series: {
             series: {
               stack:  show.stack,
               stack:  show.stack,
-              lines:  { show: show.lines, fill: scope.panel.fill },
+              lines:  { show: show.lines, fill: scope.panel.fill/10 },
               bars:   { show: show.bars,  fill: 1, barWidth: barwidth/1.8 },
               bars:   { show: show.bars,  fill: 1, barWidth: barwidth/1.8 },
               points: { show: show.points },
               points: { show: show.points },
               shadowSize: 1
               shadowSize: 1
             },
             },
             yaxis: { show: show['y-axis'], min: 0, color: "#000" },
             yaxis: { show: show['y-axis'], min: 0, color: "#000" },
             xaxis: {
             xaxis: {
+              timezone: scope.panel.timezone,
               show: show['x-axis'],
               show: show['x-axis'],
               mode: "time",
               mode: "time",
               timeformat: "%H:%M:%S<br>%m-%d",
               timeformat: "%H:%M:%S<br>%m-%d",

Some files were not shown because too many files changed in this diff