Просмотр исходного кода

Minor css changes to graph panel & full edito mode

Torkel Ödegaard 11 лет назад
Родитель
Сommit
cefdd86634

+ 1 - 10
src/app/directives/grafanaPanel.js

@@ -37,19 +37,11 @@ function (angular, $, config) {
           var getter = $parse(attr.type), panelType = getter($scope);
           var newScope = $scope.$new();
 
-          $scope.kbnJqUiDraggableOptions = {
-            revert: 'invalid',
-            helper: function() {
-              return $('<div style="width:200px;height:100px;background: rgba(100,100,100,0.50);"/>');
-            },
-            placeholder: 'keep'
-          };
-
           // compile the module and uncloack. We're done
           function loadModule($module) {
             $module.appendTo(elem);
             elem.wrap(container);
-            /* jshint indent:false */
+
             $compile(elem.contents())(newScope);
             elem.removeClass("ng-cloak");
 
@@ -81,7 +73,6 @@ function (angular, $, config) {
             $module.first().find('.panel-header').nextAll().wrapAll(content);
             loadModule($module);
           });
-
         }
       };
     });

+ 1 - 1
src/app/panels/graph/module.html

@@ -24,7 +24,7 @@
 
 	<div class="clearfix"></div>
 
-	<div class="gf-box" ng-if="editMode">
+	<div class="gf-box gf-box-full-edit" ng-if="editMode">
 		<div class="gf-box-header">
 			<div class="gf-box-title">
 				<i class="fa fa-bar-chart"></i>

+ 4 - 0
src/css/less/gfbox.less

@@ -5,6 +5,10 @@
   border: 1px solid @grafanaTargetFuncBackground;
 }
 
+.gf-box-full-edit {
+  margin: 30px 0 0 0;
+}
+
 .gf-box-header-close-btn {
   float: right;
   padding: 0;

+ 6 - 4
src/css/less/panel.less

@@ -88,11 +88,11 @@
   position: fixed;
   left: 0px;
   right: 0px;
-  top: 51px;
+  top: 55px;
   height: 100%;
-  padding: 0 10px;
+  padding: 0;
   background: @grafanaPanelBackground;
-  overflow-y: scroll;
+  overflow-y: auto;
   height: 100%;
 
   .panel-content {
@@ -102,10 +102,12 @@
   .dropdown-menu {
     margin-bottom: 70px;
   }
-
   .panel-menu {
     top: 0px;
   }
+  .panel-title-container {
+    padding: 8px;
+  }
 }
 
 .panel-menu {