{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": null,
  "graphTooltip": 0,
  "id": 66,
  "iteration": 1557388627645,
  "links": [],
  "panels": [
    {
      "columns": [],
      "datasource": "psql",
      "description": "",
      "fontSize": "90%",
      "gridPos": {
        "h": 25,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "hideTimeOverride": false,
      "id": 1,
      "links": [],
      "pageSize": 30,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 3,
        "desc": true
      },
      "styles": [
        {
          "alias": "Commit link",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "link": true,
          "linkTargetBlank": true,
          "linkTooltip": "",
          "linkUrl": "https://github.com/${__cell_4}/${__cell_5}/commit/${__cell_6}",
          "mappingType": 1,
          "pattern": "Message",
          "thresholds": [],
          "type": "string",
          "unit": "short"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Commit Org",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Commit Repo",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Commit SHA",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "MM/DD/YY h:mm:ss a",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Date",
          "thresholds": [],
          "type": "date",
          "unit": "short"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 0,
          "pattern": "/.*/",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "alias": "",
          "dsType": "influxdb",
          "format": "table",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "",
          "rawQuery": true,
          "rawSql": "select\n  split_part(str, '$$$', 1) as \"Company\",\n  split_part(str, '$$$', 2) as \"Repository group\",\n  split_part(str, '$$$', 3) as \"Committer\",\n  dt as \"Date\",\n  split_part(split_part(str, '$$$', 4), '/', 1) as \"Commit Org\",\n  split_part(split_part(str, '$$$', 4), '/', 2) as \"Commit Repo\",\n  split_part(str, '$$$', 5) as \"Commit SHA\",\n  split_part(str, '$$$', 6) as \"Message\"\nfrom\n  scompany_commits_data\nwhere\n  $__timeFilter(dt)\n  and period = 'd'\n  and ('[[repogroups:csv]]' = 'null' or split_part(str, '$$$', 2) in ([[repogroups]]))\n  and ('[[companies:csv]]' = 'null' or split_part(str, '$$$', 1) in ([[companies]]))",
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "[[full_name]] company commits table",
      "transform": "table",
      "transparent": false,
      "type": "table"
    },
    {
      "content": "${docs:raw}",
      "gridPos": {
        "h": 12,
        "w": 24,
        "x": 0,
        "y": 25
      },
      "id": 11,
      "links": [],
      "mode": "html",
      "title": "Dashboard documentation",
      "type": "text"
    }
  ],
  "refresh": false,
  "schemaVersion": 16,
  "style": "dark",
  "tags": [
    "dashboard",
    "sops",
    "table",
    "companies"
  ],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {
          "text": "Envoy",
          "value": "Envoy"
        },
        "datasource": "psql",
        "hide": 2,
        "includeAll": false,
        "label": null,
        "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": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": "null",
        "current": {
          "text": "All",
          "value": [
            "$__all"
          ]
        },
        "datasource": "psql",
        "hide": 0,
        "includeAll": true,
        "label": "Repository groups",
        "multi": true,
        "name": "repogroups",
        "options": [],
        "query": "select repo_group_name from trepo_groups order by 1",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {
          "text": "<h1 id=\"dashboard-header\">Envoy company commits table dashboard</h1>\n<p>Links:</p>\n<ul>\n<li>Company commits metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/company_commits_data.sql\" target=\"_blank\">SQL file</a>.</li>\n<li>TSDB <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\">series definition</a>. Search for <code>Company commits table</code></li>\n<li>Grafana dashboard <a href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/envoy/company-commits-table.json\" target=\"_blank\">JSON</a>.</li>\n</ul>\n<h1 id=\"description\">Description</h1>\n<ul>\n<li>This dashboard shows statistics about company commits.</li>\n<li>You can select date range to show company commits for this period.</li>\n<li>You can select multiple repository groups or all of them in a multi select dowp down.</li>\n<li>See <a href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\">here</a> for more informations about repository groups.</li>\n<li>You can select multiple companies or all of them in a multi select dowp down.</li>\n<li>We are showing top 255 most active companies in the drop-down list.</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<li>We are determining user's company affiliation from <a href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\">this file</a>, which is imported from <code>cncf/gitdm</code>.</li>\n</ul>",
          "value": "<h1 id=\"dashboard-header\">Envoy company commits table dashboard</h1>\n<p>Links:</p>\n<ul>\n<li>Company commits metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/company_commits_data.sql\" target=\"_blank\">SQL file</a>.</li>\n<li>TSDB <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\">series definition</a>. Search for <code>Company commits table</code></li>\n<li>Grafana dashboard <a href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/envoy/company-commits-table.json\" target=\"_blank\">JSON</a>.</li>\n</ul>\n<h1 id=\"description\">Description</h1>\n<ul>\n<li>This dashboard shows statistics about company commits.</li>\n<li>You can select date range to show company commits for this period.</li>\n<li>You can select multiple repository groups or all of them in a multi select dowp down.</li>\n<li>See <a href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\">here</a> for more informations about repository groups.</li>\n<li>You can select multiple companies or all of them in a multi select dowp down.</li>\n<li>We are showing top 255 most active companies in the drop-down list.</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<li>We are determining user's company affiliation from <a href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\">this file</a>, which is imported from <code>cncf/gitdm</code>.</li>\n</ul>"
        },
        "datasource": "psql",
        "hide": 2,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "docs",
        "options": [],
        "query": "select value_s from gha_vars where name = 'company_commits_docs_html'",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": true,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": "null",
        "current": {
          "text": "All",
          "value": [
            "$__all"
          ]
        },
        "datasource": "psql",
        "hide": 0,
        "includeAll": true,
        "label": "Companies",
        "multi": true,
        "name": "companies",
        "options": [],
        "query": "select companies_name from tcompanies order by time asc",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-1M",
    "to": "now"
  },
  "timepicker": {
    "hidden": false,
    "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 Commits Table",
  "uid": "56",
  "version": 13
}
