{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "uid": "grafana"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": 6,
  "iteration": 1697785601416,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "postgres",
        "uid": "P172949F98CB31475"
      },
      "description": "Shows [[full_name]] [[company_name]] [[metric]] in [[period]]",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "inspect": false
          },
          "decimals": 0,
          "displayName": "",
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "name"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Project/Repository Group"
              },
              {
                "id": "custom.align",
                "value": "left"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "value"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "[[metric:text]]"
              },
              {
                "id": "unit",
                "value": "none"
              },
              {
                "id": "custom.align",
                "value": "right"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Rank"
            },
            "properties": [
              {
                "id": "custom.align",
                "value": "left"
              },
              {
                "id": "custom.width",
                "value": 100
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Project/Repository Group"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 1636
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Contributions"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 161
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "PRs"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 193
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 22,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "hideTimeOverride": true,
      "id": 1,
      "interval": "",
      "links": [],
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": false,
            "displayName": "Rank"
          }
        ]
      },
      "pluginVersion": "8.5.27",
      "targets": [
        {
          "alias": "",
          "datasource": {
            "type": "postgres",
            "uid": "P172949F98CB31475"
          },
          "dsType": "influxdb",
          "format": "table",
          "group": [],
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "metricColumn": "none",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT \"name\", \"value\" FROM \"top_commenters_[[repogroup]]_[[period]]\" WHERE $timeFilter",
          "rawQuery": true,
          "rawSql": "select\n  (row_number() over (order by value desc, name asc)) - 1 as \"Rank\",\n  name,\n  value\nfrom\n  shcom_contrib\nwhere\n  series = 'hcom_contrib[[company]][[metric]]'\n  and period = '[[period]]'",
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": [],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "[[full_name]], [[company_name]], [[metric]] for [[period_name]]",
      "transformations": [
        {
          "id": "merge",
          "options": {
            "reducers": []
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "P172949F98CB31475"
      },
      "gridPos": {
        "h": 11,
        "w": 24,
        "x": 0,
        "y": 22
      },
      "id": 11,
      "links": [],
      "options": {
        "content": "${docs:raw}",
        "mode": "html"
      },
      "pluginVersion": "8.5.27",
      "title": "Dashboard documentation",
      "type": "text"
    }
  ],
  "refresh": false,
  "schemaVersion": 36,
  "style": "dark",
  "tags": [
    "companies",
    "dashboard",
    "table",
    "all"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "Last decade",
          "value": "Last decade"
        },
        "datasource": {
          "type": "postgres",
          "uid": "P172949F98CB31475"
        },
        "definition": "",
        "hide": 0,
        "includeAll": false,
        "label": "Range",
        "multi": false,
        "name": "period_name",
        "options": [],
        "query": "select quick_ranges_name from tquick_ranges order by time",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {
          "selected": false,
          "text": "y10",
          "value": "y10"
        },
        "datasource": {
          "type": "postgres",
          "uid": "P172949F98CB31475"
        },
        "definition": "",
        "hide": 2,
        "includeAll": false,
        "multi": false,
        "name": "period",
        "options": [],
        "query": "select quick_ranges_suffix from tquick_ranges where quick_ranges_name = '[[period_name]]'",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": true,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {
          "selected": false,
          "text": "All CNCF",
          "value": "All CNCF"
        },
        "datasource": {
          "type": "postgres",
          "uid": "P172949F98CB31475"
        },
        "definition": "",
        "hide": 2,
        "includeAll": false,
        "multi": false,
        "name": "full_name",
        "options": [],
        "query": "select value_s from gha_vars where name = 'full_name'",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": true,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {
          "selected": false,
          "text": "<h1 id=\"dashboard-header\">All CNCF company contribution counts in repository groups dashboard</h1>\n<p>Links:</p>\n<ul>\n<li>Metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/company_contribution_counts.sql\" target=\"_blank\">SQL file</a>.</li>\n<li>TSDB <a href=\"https://github.com/cncf/devstats/blob/master/metrics/all/metrics.yaml\" target=\"_blank\">series definition</a>. Search for <code>hcom_contrib</code></li>\n<li>Grafana dashboard <a href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/all/company-contribution-counts-in-repository-groups.json\" target=\"_blank\">JSON</a>.</li>\n</ul>\n<h1 id=\"description\">Description</h1>\n<ul>\n<li>This dashboard show projects/repository groups where given company has most contributions (selected metric) for a selected period.</li>\n<li>You can select last day, month, week etc. range or date range between releases, for example <code>v1.9 - v1.10</code>.</li>\n<li>See <a href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\">here</a> for more informations about periods.</li>\n<li>We are skipping bots activity, see <a href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\">excluding bots</a> for details.</li>\n</ul>",
          "value": "<h1 id=\"dashboard-header\">All CNCF company contribution counts in repository groups dashboard</h1>\n<p>Links:</p>\n<ul>\n<li>Metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/company_contribution_counts.sql\" target=\"_blank\">SQL file</a>.</li>\n<li>TSDB <a href=\"https://github.com/cncf/devstats/blob/master/metrics/all/metrics.yaml\" target=\"_blank\">series definition</a>. Search for <code>hcom_contrib</code></li>\n<li>Grafana dashboard <a href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/all/company-contribution-counts-in-repository-groups.json\" target=\"_blank\">JSON</a>.</li>\n</ul>\n<h1 id=\"description\">Description</h1>\n<ul>\n<li>This dashboard show projects/repository groups where given company has most contributions (selected metric) for a selected period.</li>\n<li>You can select last day, month, week etc. range or date range between releases, for example <code>v1.9 - v1.10</code>.</li>\n<li>See <a href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\">here</a> for more informations about periods.</li>\n<li>We are skipping bots activity, see <a href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\">excluding bots</a> for details.</li>\n</ul>"
        },
        "datasource": {
          "type": "postgres",
          "uid": "P172949F98CB31475"
        },
        "definition": "select value_s from gha_vars where name = 'company_contribution_counts_docs_html'",
        "hide": 2,
        "includeAll": false,
        "multi": false,
        "name": "docs",
        "options": [],
        "query": "select value_s from gha_vars where name = 'company_contribution_counts_docs_html'",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": true,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {
          "selected": true,
          "text": "Contributions",
          "value": "contributions"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Metric",
        "multi": false,
        "name": "metric",
        "options": [
          {
            "selected": false,
            "text": "Comments",
            "value": "comments"
          },
          {
            "selected": false,
            "text": "Commit comments",
            "value": "commitcomments"
          },
          {
            "selected": false,
            "text": "Commits",
            "value": "commits"
          },
          {
            "selected": false,
            "text": "GitHub Events",
            "value": "events"
          },
          {
            "selected": false,
            "text": "GitHub pushes",
            "value": "pushes"
          },
          {
            "selected": false,
            "text": "Issue comments",
            "value": "issuecomments"
          },
          {
            "selected": false,
            "text": "Issues",
            "value": "issues"
          },
          {
            "selected": false,
            "text": "PRs",
            "value": "prs"
          },
          {
            "selected": false,
            "text": "Merged PRs",
            "value": "mergedprs"
          },
          {
            "selected": false,
            "text": "Review comments",
            "value": "reviewcomments"
          },
          {
            "selected": false,
            "text": "Reviews submitted",
            "value": "reviews"
          },
          {
            "selected": true,
            "text": "Contributions",
            "value": "contributions"
          },
          {
            "selected": false,
            "text": "Active repositories",
            "value": "activerepos"
          }
        ],
        "query": "comments,commitcomments,commits,events,pushes,contributions,issuecomments,issues,prs,mergedprs,reviewcomments,activerepos,reviews",
        "queryValue": "",
        "skipUrlSync": false,
        "type": "custom"
      },
      {
        "current": {
          "selected": false,
          "text": "Independent",
          "value": "Independent"
        },
        "datasource": {
          "type": "postgres",
          "uid": "P172949F98CB31475"
        },
        "definition": "select companies_name from tcompanies order by time",
        "hide": 0,
        "includeAll": false,
        "label": "Company",
        "multi": false,
        "name": "company_name",
        "options": [],
        "query": "select companies_name from tcompanies order by time",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "current": {
          "selected": false,
          "text": "independent",
          "value": "independent"
        },
        "datasource": {
          "type": "postgres",
          "uid": "P172949F98CB31475"
        },
        "definition": "select companies_value from tcompanies where companies_name = '[[company_name]]'",
        "hide": 2,
        "includeAll": false,
        "multi": false,
        "name": "company",
        "options": [],
        "query": "select companies_value from tcompanies where companies_name = '[[company_name]]'",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-5y",
    "to": "now"
  },
  "timepicker": {
    "hidden": true,
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Company contribution counts in Repository Groups",
  "uid": "83",
  "version": 2,
  "weekStart": ""
}
