Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Width, height in grid pos is not picked up by the row #334

Open
Sanhajio opened this issue Jul 22, 2021 · 2 comments
Open

Width, height in grid pos is not picked up by the row #334

Sanhajio opened this issue Jul 22, 2021 · 2 comments

Comments

@Sanhajio
Copy link

Hello I use grafonnet and grizzly to create some dashboads

This code:

local globalRow = grafana.row.new(
  collapse=false,
  repeat='$instance',
  showTitle=true,
  title='Global Instance Metrics')
.addPanel(gpuCount, gridPos={ h: 7, w: 4, x: 0, y: 1 })
.addPanel(gpuUtilGauge, gridPos={ h: 7, w: 4, x: 4, y: 1 })
.addPanel(gpuPowerStat, gridPos={ h: 7, w: 4, x: 8, y: 1 })
.addPanel(gpuMemUseGauge, gridPos={ h: 7, w: 4, x: 12, y: 1 })
.addPanel(gpuTempGauge, gridPos={ h: 7, w: 4, x: 16, y: 1 })
.addPanel(gpuEnergyConsumptionTotal, gridPos={ h: 7, w: 4, x: 20, y: 1 }); 

Ends up as:

{
  "datasource": "$datasource",
  "fieldConfig": {
    "defaults": {
      "thresholds": {
        "mode": "absolute",
        "steps": [
          {
            "color": "green",
            "value": null
          }
        ]
      },
      "mappings": [],
      "links": [],
      "unit": "none"
    },
    "overrides": []
  },
  "gridPos": {
    "x": 0,
    "y": 1,
    "w": 8,
    "h": 7
  },
}

Here is my jsonnet file:

{
  "version": 1,
  "dependencies": [
    {   
      "source": {
        "git": {
          "remote": "https://github.com/grafana/grafonnet-lib.git",
          "subdir": "grafonnet"
        }   
      },  
      "version": "master"
    }   
  ],  
  "legacyImports": true
}

@own3dh2so4
Copy link

I have the same problem

@nmarcin92
Copy link

In my case the gridPos parameters are present in output json file, but they are dropped by grafana for some reason and recalculated. It's very sad since the span property has beed disabled, there is no way to programatically set panel width. But it more seems like some grafana issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants