瀏覽代碼

css cleanup, fixed issue where dashboards using relative time might not save correctly

Rashid Khan 12 年之前
父節點
當前提交
b85f2c9440
共有 3 個文件被更改,包括 44 次插入38 次删除
  1. 34 32
      common/css/main.css
  2. 1 1
      panels/column/editor.html
  3. 9 5
      panels/timepicker/module.js

+ 34 - 32
common/css/main.css

@@ -6,17 +6,19 @@
   color: #000;
 }
 
-.kibana-row {
-  margin-left: 15px;
-  margin-bottom: 15px;
-}
-
 .navbar .brand {
   color: #eee;
 }
 
 .navbar-inner {
-    border-width: 0 0 0px;
+  border-width: 0 0 0px;
+  padding-left: 0px;
+  padding-right: 0px;
+}
+
+.kibana-row {
+  margin-left: 15px;
+  margin-bottom: 15px;
 }
 
 .row-close {
@@ -54,6 +56,10 @@
   background-color: #f9f9f9;
 }
 
+.nomargin {
+  margin: 0px;
+}
+
 [ng\:cloak], [ng-cloak], .ng-cloak {
   display: none !important;
 }
@@ -90,7 +96,15 @@
   opacity: 1;
 }
 
-.pointer:hover {
+.link {
+  cursor: pointer;
+}
+
+.pointer {
+  cursor: pointer;
+}
+
+.link:hover {
   color: #0088CC;
 }
 
@@ -98,54 +112,42 @@
   max-width: 500px;
 }
 
-.pointer {
-  cursor: pointer;
+.popover-title { display: none; }
+
+.tiny {
+  font-size: 50%;
 }
 
 .small {
   font-size: 85%;
 }
 
-.input-append label {
-  font-size: inherit !important;
-}
-
 .large {
   font-size: 120%;
 }
 
-.nomargin {
-  margin: 0px;
-}
-
 .strong {
   font-weight: bold;
 }
 
-.btn-active {
-  background-color: #E6E6E6;
-  background-image: none;
-  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
-  outline: 0 none
+.input-append label {
+  font-size: inherit !important;
 }
 
-.popover-title { display: none; }
-
 .input-smaller {
   width: 75px;
 }
 
-.tiny {
-  font-size: 50%;
+.typeahead { z-index: 1051; }
+
+.btn-active {
+  background-color: #E6E6E6;
+  background-image: none;
+  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
+  outline: 0 none
 }
 
 .remove:hover {
   background-color: #A60000;
 }
 
-.typeahead { z-index: 1051; }
-
-.navbar-inner {
-  padding-left: 0px;
-  padding-right: 0px;
-}

+ 1 - 1
panels/column/editor.html

@@ -33,4 +33,4 @@
       </table>
     </div>
   </div>
-</div>
+</div>

+ 9 - 5
panels/timepicker/module.js

@@ -214,11 +214,15 @@ angular.module('kibana.timepicker', [])
     }
 
     // Update panel's string representation of the time object
-    $scope.panel.time = { 
-      from : $scope.time.from.format("mm/dd/yyyy HH:MM:ss"),
-      to : $scope.time.to.format("mm/dd/yyyy HH:MM:ss"),
-      index : $scope.time.index,
-    };
+    if($scope.panel.mode !== 'relative') {
+      $scope.panel.time = { 
+        from : $scope.time.from.format("mm/dd/yyyy HH:MM:ss"),
+        to : $scope.time.to.format("mm/dd/yyyy HH:MM:ss"),
+        index : $scope.time.index,
+      };
+    } else {
+      delete $scope.panel.time;
+    }
   };
 
   function set_timepicker(from,to) {