Browse Source

Merge branch 'develop-newgrid' of github.com:grafana/grafana into develop-newgrid

Torkel Ödegaard 8 years ago
parent
commit
a2a4325b6e

+ 7 - 2
public/app/features/dashboard/model.ts

@@ -656,14 +656,19 @@ export class DashboardModel {
         height = Math.ceil(height / CELL_HEIGHT);
         height = Math.ceil(height / CELL_HEIGHT);
 
 
         for (let panel of row.panels) {
         for (let panel of row.panels) {
+          // should wrap to next row?
+          if (xPos + panel.span >= 12) {
+            yPos += height;
+          }
+
           panel.x = xPos;
           panel.x = xPos;
           panel.y = yPos;
           panel.y = yPos;
           panel.width = panel.span;
           panel.width = panel.span;
           panel.height = height;
           panel.height = height;
 
 
-          xPos += panel.width;
-
           this.panels.push(panel);
           this.panels.push(panel);
+
+          xPos += panel.width;
         }
         }
 
 
         yPos += height;
         yPos += height;

+ 1 - 1
public/dashboards/home.json

@@ -12,7 +12,7 @@
       "title": "Home Dashboard",
       "title": "Home Dashboard",
       "collapse": false,
       "collapse": false,
       "editable": true,
       "editable": true,
-      "height": "25px",
+      "height": 150,
       "panels": [
       "panels": [
         {
         {
           "content": "<div class=\"text-center dashboard-header\">\n  <span>Home Dashboard</span>\n</div>",
           "content": "<div class=\"text-center dashboard-header\">\n  <span>Home Dashboard</span>\n</div>",

+ 0 - 1
public/sass/components/_gridstack.scss

@@ -24,7 +24,6 @@
   right: 5px;
   right: 5px;
   bottom: 0;
   bottom: 0;
   width: auto;
   width: auto;
-  z-index: 0 !important;
   text-align: center;
   text-align: center;
 }
 }
 
 

+ 0 - 4
public/sass/pages/_dashboard.scss

@@ -33,10 +33,6 @@ div.flot-text {
   }
   }
 }
 }
 
 
-.panel-margin {
-  margin: 0 0.4rem 0.8rem 0.4rem;
-}
-
 .panel-container {
 .panel-container {
   background-color: $panel-bg;
   background-color: $panel-bg;
   position: relative;
   position: relative;