# migration_log

migration_id: create migration_log table
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `migration_log` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `migration_id` TEXT NOT NULL
  , `sql` TEXT NOT NULL
  , `success` INTEGER NOT NULL
  , `error` TEXT NOT NULL
  , `timestamp` DATETIME NOT NULL
  );


migration_id: create user table
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `user` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `version` INTEGER NOT NULL
  , `login` TEXT NOT NULL
  , `email` TEXT NOT NULL
  , `name` TEXT NULL
  , `password` TEXT NULL
  , `salt` TEXT NULL
  , `rands` TEXT NULL
  , `company` TEXT NULL
  , `account_id` INTEGER NOT NULL
  , `is_admin` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create user table v2
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `user` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `version` INTEGER NOT NULL
  , `login` TEXT NOT NULL
  , `email` TEXT NOT NULL
  , `name` TEXT NULL
  , `password` TEXT NULL
  , `salt` TEXT NULL
  , `rands` TEXT NULL
  , `company` TEXT NULL
  , `org_id` INTEGER NOT NULL
  , `is_admin` INTEGER NOT NULL
  , `email_verified` INTEGER NULL
  , `theme` TEXT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: copy data_source v1 to v2
timestamp: 2024-04-09 11:21:29
sql:
  INSERT INTO `user` (`name`
  , `password`
  , `company`
  , `org_id`
  , `updated`
  , `created`
  , `id`
  , `version`
  , `login`
  , `email`
  , `salt`
  , `rands`
  , `is_admin`) SELECT `name`
  , `password`
  , `company`
  , `account_id`
  , `updated`
  , `created`
  , `id`
  , `version`
  , `login`
  , `email`
  , `salt`
  , `rands`
  , `is_admin` FROM `user_v1`


migration_id: Update is_service_account column to nullable
timestamp: 2024-04-09 11:21:29
sql:
  ALTER TABLE user ADD COLUMN tmp_service_account BOOLEAN DEFAULT 0;
  UPDATE user SET tmp_service_account = is_service_account;
  ALTER TABLE user DROP COLUMN is_service_account;
  ALTER TABLE user RENAME COLUMN tmp_service_account TO is_service_account;


migration_id: create temp user table v1-7
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `temp_user` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `email` TEXT NOT NULL
  , `name` TEXT NULL
  , `role` TEXT NULL
  , `code` TEXT NOT NULL
  , `status` TEXT NOT NULL
  , `invited_by_user_id` INTEGER NULL
  , `email_sent` INTEGER NOT NULL
  , `email_sent_on` DATETIME NULL
  , `remote_addr` TEXT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create temp_user v2
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `temp_user` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `email` TEXT NOT NULL
  , `name` TEXT NULL
  , `role` TEXT NULL
  , `code` TEXT NOT NULL
  , `status` TEXT NOT NULL
  , `invited_by_user_id` INTEGER NULL
  , `email_sent` INTEGER NOT NULL
  , `email_sent_on` DATETIME NULL
  , `remote_addr` TEXT NULL
  , `created` INTEGER NOT NULL DEFAULT 0
  , `updated` INTEGER NOT NULL DEFAULT 0
  );


migration_id: copy temp_user v1 to v2
timestamp: 2024-04-09 11:21:29
sql:
  INSERT INTO `temp_user` (`name`
  , `code`
  , `status`
  , `invited_by_user_id`
  , `email_sent`
  , `email_sent_on`
  , `id`
  , `org_id`
  , `version`
  , `email`
  , `role`
  , `remote_addr`) SELECT `name`
  , `code`
  , `status`
  , `invited_by_user_id`
  , `email_sent`
  , `email_sent_on`
  , `id`
  , `org_id`
  , `version`
  , `email`
  , `role`
  , `remote_addr` FROM `temp_user_tmp_qwerty`


migration_id: create star table
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `star` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `user_id` INTEGER NOT NULL
  , `dashboard_id` INTEGER NOT NULL
  );


migration_id: create org table v1
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `org` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `version` INTEGER NOT NULL
  , `name` TEXT NOT NULL
  , `address1` TEXT NULL
  , `address2` TEXT NULL
  , `city` TEXT NULL
  , `state` TEXT NULL
  , `zip_code` TEXT NULL
  , `country` TEXT NULL
  , `billing_email` TEXT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create org_user table v1
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `org_user` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `user_id` INTEGER NOT NULL
  , `role` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create dashboard table
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `dashboard` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `version` INTEGER NOT NULL
  , `slug` TEXT NOT NULL
  , `title` TEXT NOT NULL
  , `data` TEXT NOT NULL
  , `account_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create dashboard_tag table
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_tag` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `dashboard_id` INTEGER NOT NULL
  , `term` TEXT NOT NULL
  );


migration_id: add unique index dashboard_tag.dasboard_id_term
timestamp: 2024-04-09 11:21:29
sql:
  CREATE UNIQUE INDEX `UQE_dashboard_tag_dashboard_id_term` ON `dashboard_tag` (`dashboard_id`,`term`);


migration_id: create dashboard v2
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `dashboard` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `version` INTEGER NOT NULL
  , `slug` TEXT NOT NULL
  , `title` TEXT NOT NULL
  , `data` TEXT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: copy dashboard v1 to v2
timestamp: 2024-04-09 11:21:29
sql:
  INSERT INTO `dashboard` (`slug`
  , `title`
  , `data`
  , `org_id`
  , `created`
  , `updated`
  , `id`
  , `version`) SELECT `slug`
  , `title`
  , `data`
  , `account_id`
  , `created`
  , `updated`
  , `id`
  , `version` FROM `dashboard_v1`


migration_id: Add unique index for dashboard_org_id_title_folder_id
timestamp: 2024-04-09 11:21:29
sql:
  CREATE UNIQUE INDEX `UQE_dashboard_org_id_folder_id_title` ON `dashboard` (`org_id`,`folder_id`,`title`);


migration_id: create dashboard_provisioning
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_provisioning` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `dashboard_id` INTEGER NULL
  , `name` TEXT NOT NULL
  , `external_id` TEXT NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create dashboard_provisioning v2
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_provisioning` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `dashboard_id` INTEGER NULL
  , `name` TEXT NOT NULL
  , `external_id` TEXT NOT NULL
  , `updated` INTEGER NOT NULL DEFAULT 0
  );


migration_id: create index IDX_dashboard_provisioning_dashboard_id - v2
timestamp: 2024-04-09 11:21:29
sql:
  CREATE INDEX `IDX_dashboard_provisioning_dashboard_id` ON `dashboard_provisioning` (`dashboard_id`);


migration_id: create index IDX_dashboard_provisioning_dashboard_id_name - v2
timestamp: 2024-04-09 11:21:29
sql:
  CREATE INDEX `IDX_dashboard_provisioning_dashboard_id_name` ON `dashboard_provisioning` (`dashboard_id`,`name`);


migration_id: copy dashboard_provisioning v1 to v2
timestamp: 2024-04-09 11:21:29
sql:
  INSERT INTO `dashboard_provisioning` (`dashboard_id`
  , `name`
  , `external_id`
  , `id`) SELECT `dashboard_id`
  , `name`
  , `external_id`
  , `id` FROM `dashboard_provisioning_tmp_qwerty`


migration_id: create data_source table
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `data_source` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `account_id` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `type` TEXT NOT NULL
  , `name` TEXT NOT NULL
  , `access` TEXT NOT NULL
  , `url` TEXT NOT NULL
  , `password` TEXT NULL
  , `user` TEXT NULL
  , `database` TEXT NULL
  , `basic_auth` INTEGER NOT NULL
  , `basic_auth_user` TEXT NULL
  , `basic_auth_password` TEXT NULL
  , `is_default` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create data_source table v2
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `data_source` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `type` TEXT NOT NULL
  , `name` TEXT NOT NULL
  , `access` TEXT NOT NULL
  , `url` TEXT NOT NULL
  , `password` TEXT NULL
  , `user` TEXT NULL
  , `database` TEXT NULL
  , `basic_auth` INTEGER NOT NULL
  , `basic_auth_user` TEXT NULL
  , `basic_auth_password` TEXT NULL
  , `is_default` INTEGER NOT NULL
  , `json_data` TEXT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: copy data_source v1 to v2
timestamp: 2024-04-09 11:21:29
sql:
  INSERT INTO `data_source` (`basic_auth_password`
  , `created`
  , `id`
  , `password`
  , `user`
  , `org_id`
  , `url`
  , `name`
  , `basic_auth`
  , `basic_auth_user`
  , `is_default`
  , `version`
  , `type`
  , `updated`
  , `access`
  , `database`) SELECT `basic_auth_password`
  , `created`
  , `id`
  , `password`
  , `user`
  , `account_id`
  , `url`
  , `name`
  , `basic_auth`
  , `basic_auth_user`
  , `is_default`
  , `version`
  , `type`
  , `updated`
  , `access`
  , `database` FROM `data_source_v1`


migration_id: create api_key table
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `api_key` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `account_id` INTEGER NOT NULL
  , `name` TEXT NOT NULL
  , `key` TEXT NOT NULL
  , `role` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create api_key table v2
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `api_key` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `name` TEXT NOT NULL
  , `key` TEXT NOT NULL
  , `role` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: copy api_key v1 to v2
timestamp: 2024-04-09 11:21:29
sql:
  INSERT INTO `api_key` (`updated`
  , `id`
  , `org_id`
  , `name`
  , `key`
  , `role`
  , `created`) SELECT `updated`
  , `id`
  , `account_id`
  , `name`
  , `key`
  , `role`
  , `created` FROM `api_key_v1`


migration_id: create dashboard_snapshot table v4
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_snapshot` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `name` TEXT NOT NULL
  , `key` TEXT NOT NULL
  , `dashboard` TEXT NOT NULL
  , `expires` DATETIME NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create dashboard_snapshot table v5 #2
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_snapshot` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `name` TEXT NOT NULL
  , `key` TEXT NOT NULL
  , `delete_key` TEXT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `user_id` INTEGER NOT NULL
  , `external` INTEGER NOT NULL
  , `external_url` TEXT NOT NULL
  , `dashboard` TEXT NOT NULL
  , `expires` DATETIME NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create quota table v1
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `quota` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NULL
  , `user_id` INTEGER NULL
  , `target` TEXT NOT NULL
  , `limit` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create plugin_setting table
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `plugin_setting` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NULL
  , `plugin_id` TEXT NOT NULL
  , `enabled` INTEGER NOT NULL
  , `pinned` INTEGER NOT NULL
  , `json_data` TEXT NULL
  , `secure_json_data` TEXT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create index UQE_plugin_setting_org_id_plugin_id - v1
timestamp: 2024-04-09 11:21:29
sql:
  CREATE UNIQUE INDEX `UQE_plugin_setting_org_id_plugin_id` ON `plugin_setting` (`org_id`,`plugin_id`);


migration_id: create session table
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `session` (
  `key` TEXT PRIMARY KEY NOT NULL
  , `data` BLOB NOT NULL
  , `expiry` INTEGER NOT NULL
  );


migration_id: create playlist table v2
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `playlist` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `name` TEXT NOT NULL
  , `interval` TEXT NOT NULL
  , `org_id` INTEGER NOT NULL
  );


migration_id: create playlist item table v2
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `playlist_item` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `playlist_id` INTEGER NOT NULL
  , `type` TEXT NOT NULL
  , `value` TEXT NOT NULL
  , `title` TEXT NOT NULL
  , `order` INTEGER NOT NULL
  );


migration_id: create preferences table v3
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `preferences` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `user_id` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `home_dashboard_id` INTEGER NOT NULL
  , `timezone` TEXT NOT NULL
  , `theme` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create alert table v1
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `alert` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `version` INTEGER NOT NULL
  , `dashboard_id` INTEGER NOT NULL
  , `panel_id` INTEGER NOT NULL
  , `org_id` INTEGER NOT NULL
  , `name` TEXT NOT NULL
  , `message` TEXT NOT NULL
  , `state` TEXT NOT NULL
  , `settings` TEXT NOT NULL
  , `frequency` INTEGER NOT NULL
  , `handler` INTEGER NOT NULL
  , `severity` TEXT NOT NULL
  , `silenced` INTEGER NOT NULL
  , `execution_error` TEXT NOT NULL
  , `eval_data` TEXT NULL
  , `eval_date` DATETIME NULL
  , `new_state_date` DATETIME NOT NULL
  , `state_changes` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: Create alert_rule_tag table v1
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `alert_rule_tag` (
  `alert_id` INTEGER NOT NULL
  , `tag_id` INTEGER NOT NULL
  );


migration_id: Create alert_rule_tag table v2
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `alert_rule_tag` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `alert_id` INTEGER NOT NULL
  , `tag_id` INTEGER NOT NULL
  );


sql: CREATE UNIQUE INDEX `UQE_alert_rule_tag_alert_id_tag_id` ON `alert_rule_tag` (`alert_id`,`tag_id`);
timestamp: 2024-04-09 11:21:29
migration_id:
  create index UQE_alert_rule_tag_alert_id_tag_id - Add unique index alert_rule_tag.alert_id_tag_id V2


migration_id: copy alert_rule_tag v1 to v2
timestamp: 2024-04-09 11:21:29
sql:
  INSERT INTO `alert_rule_tag` (`alert_id`
  , `tag_id`) SELECT `alert_id`
  , `tag_id` FROM `alert_rule_tag_v1`


migration_id: create alert_notification table v1
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `alert_notification` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `name` TEXT NOT NULL
  , `type` TEXT NOT NULL
  , `settings` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create notification_journal table v1
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `alert_notification_journal` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `alert_id` INTEGER NOT NULL
  , `notifier_id` INTEGER NOT NULL
  , `sent_at` INTEGER NOT NULL
  , `success` INTEGER NOT NULL
  );


migration_id: add index notification_journal org_id & alert_id & notifier_id
timestamp: 2024-04-09 11:21:29
sql:
  CREATE INDEX `IDX_alert_notification_journal_org_id_alert_id_notifier_id` ON `alert_notification_journal` (`org_id`,`alert_id`,`notifier_id`);


migration_id: create alert_notification_state table v1
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `alert_notification_state` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `alert_id` INTEGER NOT NULL
  , `notifier_id` INTEGER NOT NULL
  , `state` TEXT NOT NULL
  , `version` INTEGER NOT NULL
  , `updated_at` INTEGER NOT NULL
  , `alert_rule_state_updated_version` INTEGER NOT NULL
  );


migration_id: add index alert_notification_state org_id & alert_id & notifier_id
timestamp: 2024-04-09 11:21:29
sql:
  CREATE UNIQUE INDEX `UQE_alert_notification_state_org_id_alert_id_notifier_id` ON `alert_notification_state` (`org_id`,`alert_id`,`notifier_id`);


migration_id: create annotation table v5
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `annotation` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `alert_id` INTEGER NULL
  , `user_id` INTEGER NULL
  , `dashboard_id` INTEGER NULL
  , `panel_id` INTEGER NULL
  , `category_id` INTEGER NULL
  , `type` TEXT NOT NULL
  , `title` TEXT NOT NULL
  , `text` TEXT NOT NULL
  , `metric` TEXT NULL
  , `prev_state` TEXT NOT NULL
  , `new_state` TEXT NOT NULL
  , `data` TEXT NOT NULL
  , `epoch` INTEGER NOT NULL
  );


migration_id: add index annotation 3 v3
timestamp: 2024-04-09 11:21:29
sql:
  CREATE INDEX `IDX_annotation_org_id_dashboard_id_panel_id_epoch` ON `annotation` (`org_id`,`dashboard_id`,`panel_id`,`epoch`);


migration_id: Create annotation_tag table v2
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `annotation_tag` (
  `annotation_id` INTEGER NOT NULL
  , `tag_id` INTEGER NOT NULL
  );


migration_id: Add unique index annotation_tag.annotation_id_tag_id
timestamp: 2024-04-09 11:21:29
sql:
  CREATE UNIQUE INDEX `UQE_annotation_tag_annotation_id_tag_id` ON `annotation_tag` (`annotation_id`,`tag_id`);


migration_id: Create annotation_tag table v3
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `annotation_tag` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `annotation_id` INTEGER NOT NULL
  , `tag_id` INTEGER NOT NULL
  );


timestamp: 2024-04-09 11:21:29
migration_id:
  create index UQE_annotation_tag_annotation_id_tag_id - Add unique index annotation_tag.annotation_id_tag_id V3

sql:
  CREATE UNIQUE INDEX `UQE_annotation_tag_annotation_id_tag_id` ON `annotation_tag` (`annotation_id`,`tag_id`);


migration_id: copy annotation_tag v2 to v3
timestamp: 2024-04-09 11:21:29
sql:
  INSERT INTO `annotation_tag` (`annotation_id`
  , `tag_id`) SELECT `annotation_id`
  , `tag_id` FROM `annotation_tag_v2`


migration_id: Add index for epoch_end
timestamp: 2024-04-09 11:21:29
sql:
  CREATE INDEX `IDX_annotation_org_id_epoch_epoch_end` ON `annotation` (`org_id`,`epoch`,`epoch_end`);


migration_id: Add index for org_id_dashboard_id_epoch_end_epoch on annotation table
timestamp: 2024-04-09 11:21:29
sql:
  CREATE INDEX `IDX_annotation_org_id_dashboard_id_epoch_end_epoch` ON `annotation` (`org_id`,`dashboard_id`,`epoch_end`,`epoch`);


migration_id: Add index for org_id_epoch_end_epoch on annotation table
timestamp: 2024-04-09 11:21:29
sql:
  CREATE INDEX `IDX_annotation_org_id_epoch_end_epoch` ON `annotation` (`org_id`,`epoch_end`,`epoch`);


migration_id: create test_data table
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `test_data` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `metric1` TEXT NULL
  , `metric2` TEXT NULL
  , `value_big_int` INTEGER NULL
  , `value_double` REAL NULL
  , `value_float` REAL NULL
  , `value_int` INTEGER NULL
  , `time_epoch` INTEGER NOT NULL
  , `time_date_time` DATETIME NOT NULL
  , `time_time_stamp` DATETIME NOT NULL
  );


migration_id: create dashboard_version table v1
timestamp: 2024-04-09 11:21:29
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_version` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `dashboard_id` INTEGER NOT NULL
  , `parent_version` INTEGER NOT NULL
  , `restored_from` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `created_by` INTEGER NOT NULL
  , `message` TEXT NOT NULL
  , `data` TEXT NOT NULL
  );


migration_id: add unique index dashboard_version.dashboard_id and dashboard_version.version
timestamp: 2024-04-09 11:21:29
sql:
  CREATE UNIQUE INDEX `UQE_dashboard_version_dashboard_id_version` ON `dashboard_version` (`dashboard_id`,`version`);


migration_id: save existing dashboard data in dashboard_version table v1
timestamp: 2024-04-09 11:21:30
sql:
  INSERT INTO dashboard_version
  (
  	dashboard_id,
  	version,
  	parent_version,
  	restored_from,
  	created,
  	created_by,
  	message,
  	data
  )
  SELECT
  	dashboard.id,
  	dashboard.version,
  	dashboard.version,
  	dashboard.version,
  	dashboard.updated,
  	COALESCE(dashboard.updated_by, -1),
  	'',
  	dashboard.data
  FROM dashboard;


migration_id: create team table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `team` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `name` TEXT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create team member table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `team_member` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `team_id` INTEGER NOT NULL
  , `user_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: add unique index team_member_org_id_team_id_user_id
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_team_member_org_id_team_id_user_id` ON `team_member` (`org_id`,`team_id`,`user_id`);


migration_id: create dashboard acl table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_acl` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `dashboard_id` INTEGER NOT NULL
  , `user_id` INTEGER NULL
  , `team_id` INTEGER NULL
  , `permission` INTEGER NOT NULL DEFAULT 4
  , `role` TEXT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: add unique index dashboard_acl_dashboard_id_user_id
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_dashboard_acl_dashboard_id_user_id` ON `dashboard_acl` (`dashboard_id`,`user_id`);


migration_id: add unique index dashboard_acl_dashboard_id_team_id
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_dashboard_acl_dashboard_id_team_id` ON `dashboard_acl` (`dashboard_id`,`team_id`);


migration_id: save default acl rules in dashboard_acl table
timestamp: 2024-04-09 11:21:30
sql:
  INSERT INTO dashboard_acl
  	(
  		org_id,
  		dashboard_id,
  		permission,
  		role,
  		created,
  		updated
  	)
  	VALUES
  		(-1,-1, 1,'Viewer','2017-06-20','2017-06-20'),
  		(-1,-1, 2,'Editor','2017-06-20','2017-06-20')
  	


migration_id: delete acl rules for deleted dashboards and folders
timestamp: 2024-04-09 11:21:30
sql:
  DELETE FROM dashboard_acl WHERE dashboard_id NOT IN (SELECT id FROM dashboard) AND dashboard_id != -1


migration_id: create tag table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `tag` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `key` TEXT NOT NULL
  , `value` TEXT NOT NULL
  );


migration_id: create login attempt table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `login_attempt` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `username` TEXT NOT NULL
  , `ip_address` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  );


migration_id: create login_attempt v2
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `login_attempt` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `username` TEXT NOT NULL
  , `ip_address` TEXT NOT NULL
  , `created` INTEGER NOT NULL DEFAULT 0
  );


migration_id: copy login_attempt v1 to v2
timestamp: 2024-04-09 11:21:30
sql:
  INSERT INTO `login_attempt` (`ip_address`
  , `id`
  , `username`) SELECT `ip_address`
  , `id`
  , `username` FROM `login_attempt_tmp_qwerty`


migration_id: create user auth table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `user_auth` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `user_id` INTEGER NOT NULL
  , `auth_module` TEXT NOT NULL
  , `auth_id` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  );


migration_id: create server_lock table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `server_lock` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `operation_uid` TEXT NOT NULL
  , `version` INTEGER NOT NULL
  , `last_execution` INTEGER NOT NULL
  );


migration_id: create user auth token table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `user_auth_token` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `user_id` INTEGER NOT NULL
  , `auth_token` TEXT NOT NULL
  , `prev_auth_token` TEXT NOT NULL
  , `user_agent` TEXT NOT NULL
  , `client_ip` TEXT NOT NULL
  , `auth_token_seen` INTEGER NOT NULL
  , `seen_at` INTEGER NULL
  , `rotated_at` INTEGER NOT NULL
  , `created_at` INTEGER NOT NULL
  , `updated_at` INTEGER NOT NULL
  );


migration_id: create cache_data table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `cache_data` (
  `cache_key` TEXT PRIMARY KEY NOT NULL
  , `data` BLOB NOT NULL
  , `expires` INTEGER NOT NULL
  , `created_at` INTEGER NOT NULL
  );


migration_id: create short_url table v1
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `short_url` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `uid` TEXT NOT NULL
  , `path` TEXT NOT NULL
  , `created_by` INTEGER NOT NULL
  , `created_at` INTEGER NOT NULL
  , `last_seen_at` INTEGER NULL
  );


migration_id: recreate alert_definition table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `alert_definition` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `title` TEXT NOT NULL
  , `condition` TEXT NOT NULL
  , `data` TEXT NOT NULL
  , `updated` DATETIME NOT NULL
  , `interval_seconds` INTEGER NOT NULL DEFAULT 60
  , `version` INTEGER NOT NULL DEFAULT 0
  , `uid` TEXT NOT NULL DEFAULT 0
  );


migration_id: recreate alert_definition_version table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `alert_definition_version` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `alert_definition_id` INTEGER NOT NULL
  , `alert_definition_uid` TEXT NOT NULL DEFAULT 0
  , `parent_version` INTEGER NOT NULL
  , `restored_from` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `title` TEXT NOT NULL
  , `condition` TEXT NOT NULL
  , `data` TEXT NOT NULL
  , `interval_seconds` INTEGER NOT NULL
  );


migration_id: add index in alert_definition_version table on alert_definition_id and version columns
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_alert_definition_version_alert_definition_id_version` ON `alert_definition_version` (`alert_definition_id`,`version`);


migration_id: add index in alert_definition_version table on alert_definition_uid and version columns
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_alert_definition_version_alert_definition_uid_version` ON `alert_definition_version` (`alert_definition_uid`,`version`);


migration_id: create alert_instance table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `alert_instance` (
  `def_org_id` INTEGER NOT NULL
  , `def_uid` TEXT NOT NULL DEFAULT 0
  , `labels` TEXT NOT NULL
  , `labels_hash` TEXT NOT NULL
  , `current_state` TEXT NOT NULL
  , `current_state_since` INTEGER NOT NULL
  , `last_eval_time` INTEGER NOT NULL
  , PRIMARY KEY ( `def_org_id`,`def_uid`,`labels_hash` ));


migration_id: add index in alert_instance table on def_org_id, def_uid and current_state columns
timestamp: 2024-04-09 11:21:30
sql:
  CREATE INDEX `IDX_alert_instance_def_org_id_def_uid_current_state` ON `alert_instance` (`def_org_id`,`def_uid`,`current_state`);


migration_id: add index in alert_instance table on def_org_id, current_state columns
timestamp: 2024-04-09 11:21:30
sql:
  CREATE INDEX `IDX_alert_instance_def_org_id_current_state` ON `alert_instance` (`def_org_id`,`current_state`);


migration_id: add index rule_org_id, rule_uid, current_state on alert_instance
timestamp: 2024-04-09 11:21:30
sql:
  CREATE INDEX `IDX_alert_instance_rule_org_id_rule_uid_current_state` ON `alert_instance` (`rule_org_id`,`rule_uid`,`current_state`);


migration_id: add index rule_org_id, current_state on alert_instance
timestamp: 2024-04-09 11:21:30
sql:
  CREATE INDEX `IDX_alert_instance_rule_org_id_current_state` ON `alert_instance` (`rule_org_id`,`current_state`);


migration_id: create alert_rule table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `alert_rule` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `title` TEXT NOT NULL
  , `condition` TEXT NOT NULL
  , `data` TEXT NOT NULL
  , `updated` DATETIME NOT NULL
  , `interval_seconds` INTEGER NOT NULL DEFAULT 60
  , `version` INTEGER NOT NULL DEFAULT 0
  , `uid` TEXT NOT NULL DEFAULT 0
  , `namespace_uid` TEXT NOT NULL
  , `rule_group` TEXT NOT NULL
  , `no_data_state` TEXT NOT NULL DEFAULT 'NoData'
  , `exec_err_state` TEXT NOT NULL DEFAULT 'Alerting'
  );


migration_id: add index in alert_rule on org_id, namespace_uid, group_uid columns
timestamp: 2024-04-09 11:21:30
sql:
  CREATE INDEX `IDX_alert_rule_org_id_namespace_uid_rule_group` ON `alert_rule` (`org_id`,`namespace_uid`,`rule_group`);


migration_id: add index in alert_rule on org_id, namespase_uid and title columns
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_alert_rule_org_id_namespace_uid_title` ON `alert_rule` (`org_id`,`namespace_uid`,`title`);


migration_id: add index in alert_rule on org_id, dashboard_uid and panel_id columns
timestamp: 2024-04-09 11:21:30
sql:
  CREATE INDEX `IDX_alert_rule_org_id_dashboard_uid_panel_id` ON `alert_rule` (`org_id`,`dashboard_uid`,`panel_id`);


migration_id: create alert_rule_version table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `alert_rule_version` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `rule_org_id` INTEGER NOT NULL
  , `rule_uid` TEXT NOT NULL DEFAULT 0
  , `rule_namespace_uid` TEXT NOT NULL
  , `rule_group` TEXT NOT NULL
  , `parent_version` INTEGER NOT NULL
  , `restored_from` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `title` TEXT NOT NULL
  , `condition` TEXT NOT NULL
  , `data` TEXT NOT NULL
  , `interval_seconds` INTEGER NOT NULL
  , `no_data_state` TEXT NOT NULL DEFAULT 'NoData'
  , `exec_err_state` TEXT NOT NULL DEFAULT 'Alerting'
  );


migration_id: add index in alert_rule_version table on rule_org_id, rule_uid and version columns
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_alert_rule_version_rule_org_id_rule_uid_version` ON `alert_rule_version` (`rule_org_id`,`rule_uid`,`version`);


migration_id: add index in alert_rule_version table on rule_org_id, rule_namespace_uid and rule_group columns
timestamp: 2024-04-09 11:21:30
sql:
  CREATE INDEX `IDX_alert_rule_version_rule_org_id_rule_namespace_uid_rule_group` ON `alert_rule_version` (`rule_org_id`,`rule_namespace_uid`,`rule_group`);


migration_id: create_alert_configuration_table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `alert_configuration` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `alertmanager_configuration` TEXT NOT NULL
  , `configuration_version` TEXT NOT NULL
  , `created_at` INTEGER NOT NULL
  );


migration_id: add configuration_hash column to alert_configuration
timestamp: 2024-04-09 11:21:30
sql:
  alter table `alert_configuration` ADD COLUMN `configuration_hash` TEXT NOT NULL DEFAULT 'not-yet-calculated' 


migration_id: create_ngalert_configuration_table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `ngalert_configuration` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `alertmanagers` TEXT NULL
  , `created_at` INTEGER NOT NULL
  , `updated_at` INTEGER NOT NULL
  );


migration_id: create provenance_type table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `provenance_type` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `record_key` TEXT NOT NULL
  , `record_type` TEXT NOT NULL
  , `provenance` TEXT NOT NULL
  );


migration_id: add index to uniquify (record_key, record_type, org_id) columns
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_provenance_type_record_type_record_key_org_id` ON `provenance_type` (`record_type`,`record_key`,`org_id`);


migration_id: create library_element table v1
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `library_element` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `folder_id` INTEGER NOT NULL
  , `uid` TEXT NOT NULL
  , `name` TEXT NOT NULL
  , `kind` INTEGER NOT NULL
  , `type` TEXT NOT NULL
  , `description` TEXT NOT NULL
  , `model` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `created_by` INTEGER NOT NULL
  , `updated` DATETIME NOT NULL
  , `updated_by` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  );


migration_id: add index library_element org_id-folder_id-name-kind
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_library_element_org_id_folder_id_name_kind` ON `library_element` (`org_id`,`folder_id`,`name`,`kind`);


migration_id: create library_element_connection table v1
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `library_element_connection` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `element_id` INTEGER NOT NULL
  , `kind` INTEGER NOT NULL
  , `connection_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `created_by` INTEGER NOT NULL
  );


migration_id: add index library_element_connection element_id-kind-connection_id
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_library_element_connection_element_id_kind_connection_id` ON `library_element_connection` (`element_id`,`kind`,`connection_id`);


migration_id: create data_keys table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `data_keys` (
  `name` TEXT PRIMARY KEY NOT NULL
  , `active` INTEGER NOT NULL
  , `scope` TEXT NOT NULL
  , `provider` TEXT NOT NULL
  , `encrypted_data` BLOB NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create kv_store table v1
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `kv_store` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `namespace` TEXT NOT NULL
  , `key` TEXT NOT NULL
  , `value` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create permission table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `permission` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `role_id` INTEGER NOT NULL
  , `action` TEXT NOT NULL
  , `scope` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: add unique index role_id_action_scope
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_permission_role_id_action_scope` ON `permission` (`role_id`,`action`,`scope`);


migration_id: create role table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `role` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `name` TEXT NOT NULL
  , `description` TEXT NULL
  , `version` INTEGER NOT NULL
  , `org_id` INTEGER NOT NULL
  , `uid` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create team role table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `team_role` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `team_id` INTEGER NOT NULL
  , `role_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  );


migration_id: add unique index team_role_org_id_team_id_role_id
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_team_role_org_id_team_id_role_id` ON `team_role` (`org_id`,`team_id`,`role_id`);


migration_id: create user role table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `user_role` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `user_id` INTEGER NOT NULL
  , `role_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  );


migration_id: add unique index user_role_org_id_user_id_role_id
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_user_role_org_id_user_id_role_id` ON `user_role` (`org_id`,`user_id`,`role_id`);


migration_id: create builtin role table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `builtin_role` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `role` TEXT NOT NULL
  , `role_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: add unique index builtin_role_org_id_role_id_role
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_builtin_role_org_id_role_id_role` ON `builtin_role` (`org_id`,`role_id`,`role`);


migration_id: create seed assignment table
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `seed_assignment` (
  `builtin_role` TEXT NOT NULL
  , `role_name` TEXT NOT NULL
  );


migration_id: add unique index builtin_role_role_name
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_seed_assignment_builtin_role_role_name` ON `seed_assignment` (`builtin_role`,`role_name`);


migration_id: create query_history table v1
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `query_history` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `uid` TEXT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `datasource_uid` TEXT NOT NULL
  , `created_by` INTEGER NOT NULL
  , `created_at` INTEGER NOT NULL
  , `comment` TEXT NOT NULL
  , `queries` TEXT NOT NULL
  );


migration_id: add index query_history.org_id-created_by-datasource_uid
timestamp: 2024-04-09 11:21:30
sql:
  CREATE INDEX `IDX_query_history_org_id_created_by_datasource_uid` ON `query_history` (`org_id`,`created_by`,`datasource_uid`);


migration_id: create query_history_star table v1
timestamp: 2024-04-09 11:21:30
sql:
  CREATE TABLE IF NOT EXISTS `query_history_star` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `query_uid` TEXT NOT NULL
  , `user_id` INTEGER NOT NULL
  );


migration_id: add index query_history.user_id-query_uid
timestamp: 2024-04-09 11:21:30
sql:
  CREATE UNIQUE INDEX `UQE_query_history_star_user_id_query_uid` ON `query_history_star` (`user_id`,`query_uid`);


# user

login: admin
email: admin@localhost
salt: trSSyKhcn7
rands: NkbHLjlKz1
created: 2024-04-09 11:21:30
updated: 2024-04-09 11:21:30
last_seen_at: 2024-04-25 07:45:07
password:
  7acdc6ef788768ad7dc94cd7c89c26455758316709f1762d32ff4efdb96d0a5f8676130eaa06a9888a075a676f85b181bc19


# dashboard

slug: activity-repository-groups
title: Activity Repository Groups
created: 2024-04-09 11:21:31.287624496+00:00
updated: 2024-04-09 11:21:31.287624576+00:00
uid: 1
data:
  {
    "iteration": 1529598229586,
    "links": [],
    "time": {
      "to": "now",
      "from": "now-30d"
    },
    "version": 2,
    "annotations": {
      "list": [
        {
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations \u0026 Alerts",
          "type": "dashboard",
          "builtIn": 1,
          "datasource": "-- Grafana --"
        },
        {
          "name": "Releases",
          "query": "SELECT title, description from annotations WHERE $timeFilter order by time asc",
          "showIn": 0,
          "tagsColumn": "title,description",
          "textColumn": "",
          "enable": true,
          "hide": false,
          "iconColor": "rgba(255, 96, 96, 1)",
          "titleColumn": "[[full_name]] Release",
          "type": "alert",
          "datasource": "psql",
          "limit": 100,
          "rawQuery": "select extract(epoch from time) AS time, title as text, description as tags from sannotations where $__timeFilter(time)"
        }
      ]
    },
    "editable": true,
    "id": 31,
    "title": "Activity Repository Groups",
    "gnetId": null,
    "graphTooltip": 0,
    "panels": [
      {
        "spaceLength": 10,
        "yaxes": [
          {
            "decimals": null,
            "format": "short",
            "label": "GitHub activity",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true
          },
          {
            "max": null,
            "min": "0",
            "show": true,
            "format": "short",
            "label": "",
            "logBase": 1
          }
        ],
        "dashLength": 10,
        "points": false,
        "seriesOverrides": [],
        "fill": 3,
        "linewidth": 0,
        "stack": true,
        "timeFrom": null,
        "dashes": false,
        "datasource": "psql",
        "decimals": null,
        "id": 2,
        "nullPointMode": "null as zero",
        "tooltip": {
          "shared": true,
          "sort": 2,
          "value_type": "individual"
        },
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": []
        },
        "bars": true,
        "percentage": false,
        "title": "[[full_name]] GitHub activity in repository groups ([[repogroups]], [[period]])",
        "timeShift": null,
        "type": "graph",
        "aliasColors": {
          
        },
        "gridPos": {
          "x": 0,
          "y": 0,
          "h": 21,
          "w": 24
        },
        "pointradius": 5,
        "legend": {
          "current": true,
          "min": true,
          "show": true,
          "sort": "total",
          "alignAsTable": true,
          "avg": true,
          "sortDesc": true,
          "total": true,
          "values": true,
          "max": true,
          "rightSide": true
        },
        "yaxis": {
          "alignLevel": null,
          "align": false
        },
        "description": "[[full_name]] GitHub activity in given repository group",
        "lines": false,
        "steppedLine": true,
        "thresholds": [],
        "links": [],
        "renderer": "flot",
        "targets": [
          {
            "alias": "",
            "measurement": "notused",
            "refId": "A",
            "dsType": "influxdb",
            "format": "time_series",
            "tags": [],
            "orderByTime": "ASC",
            "query": "SELECT /^[[repogroups]]$/ FROM \"repo_group_activity_[[period]]\" WHERE $timeFilter",
            "rawQuery": true,
            "rawSql": "select\n  time,\n  ${repogroups:csv}\nfrom\n  sact\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "groupBy": [],
            "policy": "default",
            "resultFormat": "time_series"
          }
        ]
      },
      {
        "linewidth": 1,
        "xaxis": {
          "values": [],
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true
        },
        "gridPos": {
          "h": 21,
          "w": 24,
          "x": 0,
          "y": 21
        },
        "nullPointMode": "null as zero",
        "type": "graph",
        "aliasColors": {
          
        },
        "fill": 3,
        "percentage": false,
        "dashLength": 10,
        "links": [],
        "points": false,
        "spaceLength": 10,
        "stack": false,
        "title": "[[full_name]] GitHub activity in repository groups ([[repogroups]], [[period]])",
        "tooltip": {
          "sort": 2,
          "value_type": "individual",
          "shared": true
        },
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "bars": false,
        "legend": {
          "show": true,
          "sort": "total",
          "alignAsTable": true,
          "current": true,
          "max": true,
          "min": true,
          "rightSide": true,
          "sortDesc": true,
          "total": true,
          "values": true,
          "avg": true
        },
        "renderer": "flot",
        "seriesOverrides": [],
        "steppedLine": false,
        "targets": [
          {
            "query": "SELECT /^[[repogroups]]$/ FROM \"repo_group_activity_[[period]]\" WHERE $timeFilter",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "alias": "",
            "format": "time_series",
            "policy": "default",
            "resultFormat": "time_series",
            "tags": [],
            "measurement": "notused",
            "orderByTime": "ASC",
            "rawQuery": true,
            "rawSql": "select\n  time,\n  ${repogroups:csv}\nfrom\n  sact\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "refId": "A",
            "dsType": "influxdb",
            "groupBy": []
          }
        ],
        "timeShift": null,
        "pointradius": 5,
        "dashes": false,
        "datasource": "psql",
        "decimals": null,
        "description": "[[full_name]] GitHub activity in given repository group",
        "id": 4,
        "lines": true,
        "timeFrom": null,
        "yaxes": [
          {
            "label": "GitHub activity",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true,
            "decimals": null,
            "format": "short"
          },
          {
            "format": "short",
            "label": "",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": false
          }
        ],
        "thresholds": []
      },
      {
        "renderer": "flot",
        "title": "[[full_name]] GitHub activity in repository groups ([[repogroups]], [[period]])",
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "id": 3,
        "nullPointMode": "null as zero",
        "linewidth": 0,
        "stack": true,
        "thresholds": [],
        "decimals": null,
        "fill": 3,
        "pointradius": 5,
        "type": "graph",
        "description": "[[full_name]] GitHub activity in given repository group",
        "gridPos": {
          "h": 21,
          "w": 24,
          "x": 0,
          "y": 42
        },
        "spaceLength": 10,
        "targets": [
          {
            "format": "time_series",
            "policy": "default",
            "tags": [],
            "alias": "",
            "query": "SELECT /^[[repogroups]]$/ FROM \"repo_group_activity_[[period]]\" WHERE $timeFilter",
            "rawQuery": true,
            "refId": "A",
            "resultFormat": "time_series",
            "groupBy": [],
            "measurement": "notused",
            "rawSql": "select\n  time,\n  ${repogroups:csv}\nfrom\n  sact\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "dsType": "influxdb",
            "orderByTime": "ASC"
          }
        ],
        "timeFrom": null,
        "tooltip": {
          "shared": true,
          "sort": 2,
          "value_type": "individual"
        },
        "bars": true,
        "dashLength": 10,
        "xaxis": {
          "mode": "time",
          "name": null,
          "show": true,
          "values": [],
          "buckets": null
        },
        "yaxes": [
          {
            "label": "GitHub activity",
            "logBase": 1,
            "max": "100",
            "min": "0",
            "show": true,
            "format": "short"
          },
          {
            "label": "",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true,
            "format": "short"
          }
        ],
        "links": [],
        "percentage": true,
        "points": false,
        "timeShift": null,
        "datasource": "psql",
        "legend": {
          "alignAsTable": true,
          "avg": true,
          "max": true,
          "rightSide": true,
          "total": true,
          "current": true,
          "min": true,
          "show": true,
          "sort": "total",
          "sortDesc": true,
          "values": true
        },
        "lines": false,
        "seriesOverrides": [],
        "steppedLine": true,
        "aliasColors": {
          
        },
        "dashes": false
      },
      {
        "id": 1,
        "links": [],
        "mode": "html",
        "title": "Dashboard documentation",
        "type": "text",
        "content": "${docs:raw}",
        "gridPos": {
          "h": 11,
          "w": 26,
          "x": 0,
          "y": 63
        }
      }
    ],
    "uid": "1",
    "refresh": false,
    "schemaVersion": 16,
    "timezone": "",
    "timepicker": {
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ]
    },
    "style": "dark",
    "tags": [
      "dashboard",
      "cii"
    ],
    "templating": {
      "list": [
        {
          "label": null,
          "options": [],
          "query": "select value_s from gha_vars where name = 'full_name'",
          "refresh": 1,
          "skipUrlSync": true,
          "tags": [],
          "useTags": false,
          "current": {
            
          },
          "datasource": "psql",
          "hide": 2,
          "regex": "",
          "sort": 0,
          "allValue": null,
          "name": "full_name",
          "tagValuesQuery": "",
          "tagsQuery": "",
          "type": "query",
          "includeAll": false,
          "multi": false
        },
        {
          "hide": 0,
          "query": "h,d,w,m,q,y",
          "skipUrlSync": false,
          "type": "custom",
          "allValue": null,
          "current": {
            "tags": [],
            "text": "24 Hours MA",
            "value": "h24"
          },
          "multi": false,
          "name": "period",
          "options": [
            {
              "selected": false,
              "text": "Hour",
              "value": "h"
            },
            {
              "selected": true,
              "text": "24 Hours MA",
              "value": "h24"
            },
            {
              "selected": false,
              "text": "Day",
              "value": "d"
            },
            {
              "selected": false,
              "text": "7 Days MA",
              "value": "d7"
            },
            {
              "selected": false,
              "text": "Week",
              "value": "w"
            },
            {
              "selected": false,
              "text": "Month",
              "value": "m"
            },
            {
              "selected": false,
              "text": "Quarter",
              "value": "q"
            },
            {
              "selected": false,
              "text": "Year",
              "value": "y"
            }
          ],
          "includeAll": false,
          "label": "Period"
        },
        {
          "type": "query",
          "regex": "",
          "sort": 0,
          "tagValuesQuery": "",
          "name": "repogroups",
          "tagsQuery": "",
          "useTags": false,
          "current": {
            
          },
          "hide": 0,
          "refresh": 1,
          "label": "Repository group",
          "multi": true,
          "options": [],
          "query": "select '\"' || repo_group_name || '\"' from trepo_groups order by 1",
          "skipUrlSync": false,
          "allValue": "",
          "datasource": "psql",
          "includeAll": true,
          "tags": []
        },
        {
          "datasource": "psql",
          "label": null,
          "name": "docs",
          "allValue": null,
          "refresh": 1,
          "type": "query",
          "hide": 2,
          "multi": false,
          "options": [],
          "regex": "",
          "skipUrlSync": true,
          "sort": 0,
          "tagsQuery": "",
          "current": {
            
          },
          "includeAll": false,
          "query": "select value_s from gha_vars where name = 'activity_docs_html'",
          "tagValuesQuery": "",
          "tags": [],
          "useTags": false
        }
      ]
    }
  }


slug: commits-repository-groups
title: Commits Repository Groups
created: 2024-04-09 11:21:31.295094702+00:00
updated: 2024-04-09 11:21:31.295094782+00:00
uid: 2
data:
  {
    "templating": {
      "list": [
        {
          "allValue": null,
          "current": {
            
          },
          "includeAll": false,
          "options": [],
          "useTags": false,
          "label": null,
          "name": "full_name",
          "query": "select value_s from gha_vars where name = 'full_name'",
          "regex": "",
          "tagsQuery": "",
          "tagValuesQuery": "",
          "tags": [],
          "type": "query",
          "hide": 2,
          "multi": false,
          "refresh": 1,
          "skipUrlSync": true,
          "sort": 0,
          "datasource": "psql"
        },
        {
          "skipUrlSync": false,
          "allValue": null,
          "current": {
            "tags": [],
            "text": "24 Hours MA",
            "value": "h24"
          },
          "includeAll": false,
          "multi": false,
          "name": "period",
          "options": [
            {
              "selected": false,
              "text": "Hour",
              "value": "h"
            },
            {
              "value": "h24",
              "selected": true,
              "text": "24 Hours MA"
            },
            {
              "selected": false,
              "text": "Day",
              "value": "d"
            },
            {
              "value": "d7",
              "selected": false,
              "text": "7 Days MA"
            },
            {
              "selected": false,
              "text": "Week",
              "value": "w"
            },
            {
              "selected": false,
              "text": "Month",
              "value": "m"
            },
            {
              "selected": false,
              "text": "Quarter",
              "value": "q"
            },
            {
              "selected": false,
              "text": "Year",
              "value": "y"
            }
          ],
          "hide": 0,
          "label": "Period",
          "query": "h,d,w,m,q,y",
          "type": "custom"
        },
        {
          "skipUrlSync": false,
          "sort": 0,
          "tagsQuery": "",
          "useTags": false,
          "multi": true,
          "name": "repogroups",
          "refresh": 1,
          "tagValuesQuery": "",
          "tags": [],
          "type": "query",
          "hide": 0,
          "query": "select '\"' || repo_group_name || '\"' from trepo_groups order by 1",
          "regex": "",
          "allValue": "",
          "current": {
            
          },
          "datasource": "psql",
          "includeAll": true,
          "label": "Repository group",
          "options": []
        },
        {
          "name": "docs",
          "refresh": 1,
          "regex": "",
          "skipUrlSync": true,
          "tags": [],
          "current": {
            
          },
          "includeAll": false,
          "multi": false,
          "sort": 0,
          "tagsQuery": "",
          "useTags": false,
          "allValue": null,
          "datasource": "psql",
          "label": null,
          "tagValuesQuery": "",
          "hide": 2,
          "options": [],
          "query": "select value_s from gha_vars where name = 'commits_docs_html'",
          "type": "query"
        }
      ]
    },
    "uid": "2",
    "annotations": {
      "list": [
        {
          "type": "dashboard",
          "builtIn": 1,
          "datasource": "-- Grafana --",
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations \u0026 Alerts"
        },
        {
          "tagsColumn": "title,description",
          "textColumn": "",
          "type": "alert",
          "datasource": "psql",
          "limit": 100,
          "iconColor": "rgba(255, 96, 96, 1)",
          "name": "Releases",
          "query": "SELECT title, description from annotations WHERE $timeFilter order by time asc",
          "rawQuery": "select extract(epoch from time) AS time, title as text, description as tags from sannotations where $__timeFilter(time)",
          "showIn": 0,
          "titleColumn": "[[full_name]] Release",
          "enable": true,
          "hide": false
        }
      ]
    },
    "id": 30,
    "style": "dark",
    "tags": [
      "dashboard",
      "cii"
    ],
    "time": {
      "from": "now-30d",
      "to": "now"
    },
    "refresh": false,
    "schemaVersion": 16,
    "timezone": "",
    "title": "Commits Repository Groups",
    "editable": true,
    "graphTooltip": 0,
    "links": [],
    "panels": [
      {
        "decimals": null,
        "nullPointMode": "null as zero",
        "steppedLine": true,
        "timeShift": null,
        "type": "graph",
        "points": false,
        "timeFrom": null,
        "yaxes": [
          {
            "decimals": null,
            "format": "short",
            "label": "Commits",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true
          },
          {
            "format": "short",
            "label": "",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true
          }
        ],
        "percentage": false,
        "pointradius": 5,
        "id": 2,
        "lines": false,
        "linewidth": 0,
        "thresholds": [],
        "bars": true,
        "datasource": "psql",
        "description": "[[full_name]] commits in given repository group",
        "spaceLength": 10,
        "xaxis": {
          "values": [],
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true
        },
        "legend": {
          "avg": true,
          "current": true,
          "max": true,
          "sort": "total",
          "sortDesc": true,
          "total": true,
          "alignAsTable": true,
          "min": true,
          "rightSide": true,
          "show": true,
          "values": true
        },
        "renderer": "flot",
        "seriesOverrides": [],
        "stack": true,
        "title": "[[full_name]] commits in repository groups ([[repogroups]], [[period]])",
        "aliasColors": {
          
        },
        "gridPos": {
          "y": 0,
          "h": 21,
          "w": 24,
          "x": 0
        },
        "targets": [
          {
            "groupBy": [],
            "orderByTime": "ASC",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "tags": [],
            "alias": "",
            "format": "time_series",
            "rawQuery": true,
            "measurement": "notused",
            "query": "SELECT /^[[repogroups]]$/ FROM \"repo_group_commits_[[period]]\" WHERE $timeFilter",
            "rawSql": "select\n  time,\n  ${repogroups:csv}\nfrom\n  scommits\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "resultFormat": "time_series",
            "dsType": "influxdb",
            "policy": "default",
            "refId": "A"
          }
        ],
        "tooltip": {
          "value_type": "individual",
          "shared": true,
          "sort": 2
        },
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "dashLength": 10,
        "dashes": false,
        "fill": 3,
        "links": []
      },
      {
        "gridPos": {
          "h": 21,
          "w": 24,
          "x": 0,
          "y": 21
        },
        "linewidth": 1,
        "type": "graph",
        "yaxes": [
          {
            "label": "Commits",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true,
            "decimals": null,
            "format": "short"
          },
          {
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": false,
            "format": "short",
            "label": ""
          }
        ],
        "datasource": "psql",
        "description": "[[full_name]] commits in given repository group",
        "points": false,
        "spaceLength": 10,
        "thresholds": [],
        "timeShift": null,
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": []
        },
        "dashes": false,
        "decimals": null,
        "fill": 3,
        "pointradius": 5,
        "targets": [
          {
            "orderByTime": "ASC",
            "query": "SELECT /^[[repogroups]]$/ FROM \"repo_group_commits_[[period]]\" WHERE $timeFilter",
            "refId": "A",
            "alias": "",
            "policy": "default",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "rawSql": "select\n  time,\n  ${repogroups:csv}\nfrom\n  scommits\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "tags": [],
            "format": "time_series",
            "groupBy": [],
            "measurement": "notused",
            "dsType": "influxdb",
            "rawQuery": true,
            "resultFormat": "time_series"
          }
        ],
        "bars": false,
        "steppedLine": false,
        "title": "[[full_name]] commits in repository groups ([[repogroups]], [[period]])",
        "aliasColors": {
          
        },
        "lines": true,
        "percentage": false,
        "tooltip": {
          "shared": true,
          "sort": 2,
          "value_type": "individual"
        },
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "dashLength": 10,
        "legend": {
          "alignAsTable": true,
          "avg": true,
          "current": true,
          "show": true,
          "sortDesc": true,
          "max": true,
          "min": true,
          "rightSide": true,
          "sort": "total",
          "total": true,
          "values": true
        },
        "links": [],
        "stack": false,
        "id": 4,
        "nullPointMode": "null as zero",
        "renderer": "flot",
        "seriesOverrides": [],
        "timeFrom": null
      },
      {
        "yaxes": [
          {
            "min": "0",
            "show": true,
            "format": "short",
            "label": "Commits",
            "logBase": 1,
            "max": "100"
          },
          {
            "min": "0",
            "show": true,
            "format": "short",
            "label": "",
            "logBase": 1,
            "max": null
          }
        ],
        "bars": true,
        "timeShift": null,
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": []
        },
        "type": "graph",
        "id": 3,
        "percentage": true,
        "seriesOverrides": [],
        "decimals": null,
        "aliasColors": {
          
        },
        "dashLength": 10,
        "datasource": "psql",
        "fill": 3,
        "stack": true,
        "timeFrom": null,
        "spaceLength": 10,
        "thresholds": [],
        "tooltip": {
          "shared": true,
          "sort": 2,
          "value_type": "individual"
        },
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "gridPos": {
          "h": 21,
          "w": 24,
          "x": 0,
          "y": 42
        },
        "links": [],
        "points": false,
        "pointradius": 5,
        "steppedLine": true,
        "dashes": false,
        "description": "[[full_name]] commits in given repository group",
        "legend": {
          "alignAsTable": true,
          "avg": true,
          "max": true,
          "min": true,
          "rightSide": true,
          "show": true,
          "sort": "total",
          "values": true,
          "current": true,
          "sortDesc": true,
          "total": true
        },
        "renderer": "flot",
        "targets": [
          {
            "dsType": "influxdb",
            "policy": "default",
            "rawQuery": true,
            "rawSql": "select\n  time,\n  ${repogroups:csv}\nfrom\n  scommits\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "format": "time_series",
            "tags": [],
            "groupBy": [],
            "measurement": "notused",
            "query": "SELECT /^[[repogroups]]$/ FROM \"repo_group_commits_[[period]]\" WHERE $timeFilter",
            "refId": "A",
            "resultFormat": "time_series",
            "alias": "",
            "orderByTime": "ASC"
          }
        ],
        "title": "[[full_name]] commits in repository groups ([[repogroups]], [[period]])",
        "lines": false,
        "linewidth": 0,
        "nullPointMode": "null as zero"
      },
      {
        "type": "text",
        "content": "${docs:raw}",
        "gridPos": {
          "h": 11,
          "w": 26,
          "x": 0,
          "y": 63
        },
        "id": 11,
        "links": [],
        "mode": "html",
        "title": "Dashboard documentation"
      }
    ],
    "version": 2,
    "gnetId": null,
    "iteration": 1529598246392,
    "timepicker": {
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ]
    }
  }


slug: companies-contributing-in-repository-groups
title: Companies Contributing in Repository Groups
created: 2024-04-09 11:21:31.300303498+00:00
updated: 2024-04-09 11:21:31.300303608+00:00
uid: 7
data:
  {
    "title": "Companies Contributing in Repository Groups",
    "graphTooltip": 0,
    "id": 3,
    "panels": [
      {
        "dashLength": 10,
        "targets": [
          {
            "alias": "Number of contributing companies",
            "hide": false,
            "measurement": "reviewers_d",
            "policy": "autogen",
            "query": "SELECT \"value\" FROM \"autogen\".\"num_stats_[[repogroup]]_companies_[[period]]\" WHERE $timeFilter",
            "resultFormat": "time_series",
            "dsType": "influxdb",
            "groupBy": [],
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "orderByTime": "ASC",
            "rawQuery": true,
            "rawSql": "select\n  time,\n  value as \"Number of contributing companies\"\nfrom\n  snum_stats\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'nstats[[repogroup]]comps'\norder by\n  time",
            "tags": []
          },
          {
            "groupBy": [],
            "measurement": "reviewers_d",
            "orderByTime": "ASC",
            "query": "SELECT \"value\" FROM \"autogen\".\"num_stats_[[repogroup]]_developers_[[period]]\" WHERE $timeFilter",
            "refId": "B",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "alias": "Number of contributing developers",
            "hide": false,
            "rawQuery": true,
            "policy": "autogen",
            "rawSql": "select\n  time,\n  value as \"Number of contributing developers\"\nfrom\n  snum_stats\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'nstats[[repogroup]]devs'\norder by\n  time",
            "resultFormat": "time_series",
            "tags": [],
            "dsType": "influxdb"
          }
        ],
        "bars": false,
        "legend": {
          "alignAsTable": true,
          "current": true,
          "hideEmpty": false,
          "values": true,
          "avg": true,
          "hideZero": false,
          "max": true,
          "min": true,
          "rightSide": false,
          "show": true,
          "total": false
        },
        "tooltip": {
          "shared": true,
          "sort": 0,
          "value_type": "individual"
        },
        "transparent": true,
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "decimals": 0,
        "id": 1,
        "seriesOverrides": [
          {
            "alias": "Number of contributing developers",
            "yaxis": 2
          }
        ],
        "spaceLength": 10,
        "timeFrom": null,
        "fillGradient": 0,
        "gridPos": {
          "h": 22,
          "w": 24,
          "x": 0,
          "y": 0
        },
        "lines": true,
        "options": {
          "dataLinks": []
        },
        "percentage": false,
        "points": false,
        "thresholds": [],
        "title": "Contributing companies and developers ([[repogroup_name]], [[period]])",
        "yaxes": [
          {
            "format": "none",
            "label": "Companies",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true
          },
          {
            "show": true,
            "format": "none",
            "label": "Developers",
            "logBase": 1,
            "max": null,
            "min": "0"
          }
        ],
        "aliasColors": {
          
        },
        "description": "",
        "fill": 1,
        "linewidth": 1,
        "renderer": "flot",
        "timeShift": null,
        "type": "graph",
        "dashes": false,
        "steppedLine": false,
        "timeRegions": [],
        "pointradius": 1,
        "datasource": "psql",
        "links": [],
        "nullPointMode": "null",
        "stack": false,
        "xaxis": {
          "show": true,
          "values": [
            "total"
          ],
          "buckets": null,
          "mode": "time",
          "name": null
        }
      },
      {
        "content": "${docs:raw}",
        "id": 11,
        "mode": "html",
        "options": {
          
        },
        "title": "Dashboard documentation",
        "type": "text",
        "datasource": null,
        "gridPos": {
          "w": 24,
          "x": 0,
          "y": 22,
          "h": 12
        },
        "links": []
      }
    ],
    "schemaVersion": 20,
    "timezone": "",
    "uid": "7",
    "gnetId": null,
    "iteration": 1572089653948,
    "refresh": false,
    "time": {
      "from": "now-2y",
      "to": "now"
    },
    "version": 2,
    "editable": true,
    "links": [],
    "style": "dark",
    "timepicker": {
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ]
    },
    "annotations": {
      "list": [
        {
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations \u0026 Alerts",
          "type": "dashboard",
          "builtIn": 1,
          "datasource": "-- Grafana --"
        },
        {
          "datasource": "psql",
          "enable": true,
          "hide": false,
          "iconColor": "rgba(255, 96, 96, 1)",
          "limit": 100,
          "name": "Releases",
          "rawQuery": "select extract(epoch from time) AS time, title as text, description as tags from sannotations where $__timeFilter(time)",
          "type": "alert",
          "query": "SELECT title, description from annotations WHERE $timeFilter order by time asc",
          "showIn": 0,
          "tagsColumn": "title,description",
          "textColumn": "",
          "titleColumn": "[[full_name]] release"
        }
      ]
    },
    "tags": [
      "companies",
      "dashboard",
      "cii"
    ],
    "templating": {
      "list": [
        {
          "current": {
            "text": "CII",
            "value": "CII"
          },
          "hide": 2,
          "refresh": 1,
          "sort": 0,
          "datasource": "psql",
          "definition": "",
          "includeAll": false,
          "label": null,
          "useTags": false,
          "allValue": null,
          "options": [],
          "query": "select value_s from gha_vars where name = 'full_name'",
          "tagValuesQuery": "",
          "tags": [],
          "tagsQuery": "",
          "multi": false,
          "name": "full_name",
          "regex": "",
          "skipUrlSync": true,
          "type": "query"
        },
        {
          "allValue": null,
          "hide": 0,
          "multi": false,
          "name": "period",
          "options": [
            {
              "selected": false,
              "text": "7 Days MA",
              "value": "d7"
            },
            {
              "selected": true,
              "text": "28 Days MA",
              "value": "d28"
            },
            {
              "selected": false,
              "text": "Week",
              "value": "w"
            },
            {
              "value": "m",
              "selected": false,
              "text": "Month"
            },
            {
              "selected": false,
              "text": "Quarter",
              "value": "q"
            }
          ],
          "current": {
            "selected": true,
            "text": "28 Days MA",
            "value": "d28"
          },
          "includeAll": false,
          "label": "Period",
          "query": "d7,d28,w,m,q",
          "skipUrlSync": false,
          "type": "custom"
        },
        {
          "query": "select all_repo_group_name from tall_repo_groups order by 1",
          "skipUrlSync": false,
          "useTags": false,
          "includeAll": false,
          "current": {
            "selected": false,
            "tags": [],
            "text": "All",
            "value": "All"
          },
          "datasource": "psql",
          "options": [],
          "refresh": 1,
          "regex": "",
          "type": "query",
          "allValue": null,
          "hide": 0,
          "label": "Repository group",
          "name": "repogroup_name",
          "tagValuesQuery": "",
          "tagsQuery": "",
          "definition": "",
          "sort": 0,
          "tags": [],
          "multi": false
        },
        {
          "current": {
            "value": "all",
            "text": "all"
          },
          "hide": 2,
          "query": "select all_repo_group_value from tall_repo_groups where all_repo_group_name = '[[repogroup_name]]'",
          "tagsQuery": "",
          "datasource": "psql",
          "includeAll": false,
          "name": "repogroup",
          "options": [],
          "refresh": 1,
          "skipUrlSync": true,
          "tags": [],
          "type": "query",
          "regex": "",
          "allValue": null,
          "definition": "",
          "label": "",
          "multi": false,
          "sort": 0,
          "tagValuesQuery": "",
          "useTags": false
        },
        {
          "hide": 2,
          "options": [],
          "allValue": null,
          "current": {
            "text": "\u003ch1 id=\"dashboard-header\"\u003eCII contributing companies dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/num_stats.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003enum_stats\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/cii/companies-contributing-in-repository-groups.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows how many companies and developers are contributing in a given repository group.\u003c/li\u003e\n\u003cli\u003eBy contributor we mean someone who made a review, comment, commit, created issue or PR, reviwed PR, commented on issue or PR.\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary for all of them.\u003c/li\u003e\n\u003cli\u003eSelecting period (for example week) means that dashboard will show data in those periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots activity, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003cli\u003eWe are determining user's company affiliation from \u003ca href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\"\u003ethis file\u003c/a\u003e, which is imported from \u003ccode\u003ecncf/gitdm\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e",
            "value": "\u003ch1 id=\"dashboard-header\"\u003eCII contributing companies dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/num_stats.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003enum_stats\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/cii/companies-contributing-in-repository-groups.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows how many companies and developers are contributing in a given repository group.\u003c/li\u003e\n\u003cli\u003eBy contributor we mean someone who made a review, comment, commit, created issue or PR, reviwed PR, commented on issue or PR.\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary for all of them.\u003c/li\u003e\n\u003cli\u003eSelecting period (for example week) means that dashboard will show data in those periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots activity, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003cli\u003eWe are determining user's company affiliation from \u003ca href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\"\u003ethis file\u003c/a\u003e, which is imported from \u003ccode\u003ecncf/gitdm\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e"
          },
          "datasource": "psql",
          "regex": "",
          "skipUrlSync": true,
          "sort": 0,
          "multi": false,
          "query": "select value_s from gha_vars where name = 'contributing_companies_docs_html'",
          "tags": [],
          "tagsQuery": "",
          "type": "query",
          "useTags": false,
          "definition": "",
          "includeAll": false,
          "label": null,
          "name": "docs",
          "refresh": 1,
          "tagValuesQuery": ""
        }
      ]
    }
  }


slug: companies-table
title: Companies Table
created: 2024-04-09 11:21:31.306284702+00:00
updated: 2024-04-09 11:21:31.306284782+00:00
uid: 5
data:
  {
    "schemaVersion": 19,
    "style": "dark",
    "templating": {
      "list": [
        {
          "regex": "",
          "tagValuesQuery": "",
          "multi": false,
          "name": "period_name",
          "hide": 0,
          "includeAll": false,
          "refresh": 1,
          "skipUrlSync": false,
          "tags": [],
          "type": "query",
          "allValue": null,
          "definition": "",
          "useTags": false,
          "query": "select quick_ranges_name from tquick_ranges order by time",
          "tagsQuery": "",
          "label": "Range",
          "options": [],
          "sort": 0,
          "current": {
            "text": "Last decade",
            "value": "Last decade"
          },
          "datasource": "psql"
        },
        {
          "current": {
            "text": "All CNCF",
            "value": "All CNCF"
          },
          "name": "full_name",
          "query": "select value_s from gha_vars where name = 'full_name'",
          "sort": 0,
          "hide": 2,
          "options": [],
          "tagValuesQuery": "",
          "tagsQuery": "",
          "type": "query",
          "includeAll": false,
          "label": null,
          "multi": false,
          "refresh": 1,
          "skipUrlSync": true,
          "tags": [],
          "useTags": false,
          "allValue": null,
          "datasource": "psql",
          "definition": "",
          "regex": ""
        },
        {
          "allValue": null,
          "hide": 0,
          "includeAll": false,
          "name": "metric",
          "options": [
            {
              "value": "commenters",
              "selected": false,
              "text": "Commenters"
            },
            {
              "selected": false,
              "text": "Comments",
              "value": "comments"
            },
            {
              "text": "Commit commenters",
              "value": "commitcommenters",
              "selected": false
            },
            {
              "selected": false,
              "text": "Commits",
              "value": "commits"
            },
            {
              "selected": false,
              "text": "Committers",
              "value": "committers"
            },
            {
              "selected": false,
              "text": "Documentation commits",
              "value": "documentationcommits"
            },
            {
              "selected": false,
              "text": "Documentation committers",
              "value": "documentationcommitters"
            },
            {
              "selected": false,
              "text": "Pushers",
              "value": "pushers"
            },
            {
              "selected": false,
              "text": "GitHub Events",
              "value": "events"
            },
            {
              "selected": false,
              "text": "Forkers",
              "value": "forkers"
            },
            {
              "selected": false,
              "text": "Issue commenters",
              "value": "issuecommenters"
            },
            {
              "selected": false,
              "text": "Issues",
              "value": "issues"
            },
            {
              "selected": false,
              "text": "PR authors",
              "value": "prcreators"
            },
            {
              "selected": false,
              "text": "PR reviewers",
              "value": "prreviewers"
            },
            {
              "text": "PR review commenters",
              "value": "prreviewcommenters",
              "selected": false
            },
            {
              "selected": false,
              "text": "PR reviews",
              "value": "prreviews"
            },
            {
              "selected": false,
              "text": "Pull requests",
              "value": "prs"
            },
            {
              "selected": false,
              "text": "Contributing in repositories",
              "value": "repositories"
            },
            {
              "text": "Contributors",
              "value": "contributors",
              "selected": false
            },
            {
              "selected": true,
              "text": "Contributions",
              "value": "contributions"
            },
            {
              "selected": false,
              "text": "Watchers",
              "value": "watchers"
            }
          ],
          "query": "commenters,comments,commitcommenters,commits,committers,documentationcommits,documentationcommitters,pushers,events,forkers,issuecommenters,issues,prcreators,prreviewers,prs,repositories,watchers,prreviewcommenters,prreviews",
          "type": "custom",
          "current": {
            "selected": true,
            "tags": [],
            "text": "Contributions",
            "value": "contributions"
          },
          "label": "Metric",
          "multi": false,
          "skipUrlSync": false
        },
        {
          "hide": 2,
          "multi": false,
          "options": [],
          "refresh": 1,
          "skipUrlSync": true,
          "useTags": false,
          "current": {
            "text": "y10",
            "value": "y10"
          },
          "tagValuesQuery": "",
          "includeAll": false,
          "label": null,
          "query": "select quick_ranges_suffix from tquick_ranges where quick_ranges_name = '[[period_name]]'",
          "regex": "",
          "tags": [],
          "type": "query",
          "definition": "",
          "datasource": "psql",
          "name": "period",
          "sort": 0,
          "tagsQuery": "",
          "allValue": null
        },
        {
          "useTags": false,
          "query": "select value_s from gha_vars where name = 'companies_summary_docs_html'",
          "tagValuesQuery": "",
          "type": "query",
          "hide": 2,
          "includeAll": false,
          "label": null,
          "regex": "",
          "skipUrlSync": true,
          "current": {
            "text": "\u003ch1 id=\"dashboard-header\"\u003eAll CNCF companies table dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/project_company_stats.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003eproject_company_stats\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/all/companies-table.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows various GitHub metrics and aggregate them by actors companies.\u003c/li\u003e\n\u003cli\u003eContributor is defined as somebody who made a review, comment, commit, created PR or issue.\u003c/li\u003e\n\u003cli\u003eContribution is a review, comment, commit, issue or PR.\u003c/li\u003e\n\u003cli\u003eYou can select last day, month, week etc. range or date range between releases, for example \u003ccode\u003ev1.9 - v1.10\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots activity, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003cli\u003eWe are determining user's company affiliation from \u003ca href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\"\u003ethis file\u003c/a\u003e, which is imported from \u003ccode\u003ecncf/gitdm\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e",
            "value": "\u003ch1 id=\"dashboard-header\"\u003eAll CNCF companies table dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/project_company_stats.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003eproject_company_stats\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/all/companies-table.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows various GitHub metrics and aggregate them by actors companies.\u003c/li\u003e\n\u003cli\u003eContributor is defined as somebody who made a review, comment, commit, created PR or issue.\u003c/li\u003e\n\u003cli\u003eContribution is a review, comment, commit, issue or PR.\u003c/li\u003e\n\u003cli\u003eYou can select last day, month, week etc. range or date range between releases, for example \u003ccode\u003ev1.9 - v1.10\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots activity, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003cli\u003eWe are determining user's company affiliation from \u003ca href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\"\u003ethis file\u003c/a\u003e, which is imported from \u003ccode\u003ecncf/gitdm\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e"
          },
          "datasource": "psql",
          "definition": "",
          "sort": 0,
          "tags": [],
          "multi": false,
          "name": "docs",
          "options": [],
          "allValue": null,
          "refresh": 1,
          "tagsQuery": ""
        }
      ]
    },
    "timezone": "",
    "title": "Companies Table",
    "id": 4,
    "iteration": 1568187873681,
    "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"
      ]
    },
    "version": 2,
    "editable": true,
    "time": {
      "from": "now-5y",
      "to": "now"
    },
    "links": [],
    "tags": [
      "dashboard",
      "cii",
      "companies",
      "table"
    ],
    "graphTooltip": 0,
    "panels": [
      {
        "transform": "table",
        "datasource": "psql",
        "description": "",
        "showHeader": true,
        "sort": {
          "col": 0,
          "desc": false
        },
        "targets": [
          {
            "orderByTime": "ASC",
            "rawQuery": true,
            "refId": "A",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "dsType": "influxdb",
            "group": [],
            "groupBy": [
              {
                "params": [
                  "$__interval"
                ],
                "type": "time"
              },
              {
                "params": [
                  "null"
                ],
                "type": "fill"
              }
            ],
            "policy": "default",
            "query": "SELECT \"name\", \"value\" FROM \"project_company_stats_[[metric]]_[[period]]\" WHERE $timeFilter",
            "rawSql": "select\n  (row_number() over (order by value desc, name asc) -1) as \"Rank\",\n  name,\n  value\nfrom\n  shcom\nwhere\n  series = 'hcom[[metric]]'\n  and period = '[[period]]'",
            "resultFormat": "table",
            "alias": "",
            "format": "table",
            "metricColumn": "none",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                },
                {
                  "type": "mean",
                  "params": []
                }
              ]
            ],
            "tags": [],
            "timeColumn": "time"
          }
        ],
        "columns": [],
        "gridPos": {
          "h": 22,
          "w": 24,
          "x": 0,
          "y": 0
        },
        "hideTimeOverride": true,
        "id": 1,
        "styles": [
          {
            "decimals": null,
            "pattern": "Time",
            "type": "hidden",
            "alias": "Time",
            "dateFormat": "YYYY-MM-DD HH:mm:ss"
          },
          {
            "preserveFormat": false,
            "thresholds": [],
            "alias": "Company",
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "pattern": "name",
            "type": "string",
            "unit": "short",
            "colorMode": null,
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ],
            "decimals": 2
          },
          {
            "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",
            "unit": "none",
            "colorMode": null,
            "decimals": 0,
            "pattern": "value",
            "thresholds": [],
            "type": "number",
            "alias": "Number"
          },
          {
            "thresholds": [
              "1"
            ],
            "type": "number",
            "unit": "none",
            "alias": "",
            "colorMode": "value",
            "colors": [
              "rgba(0, 0, 0, 0)",
              "rgb(255, 255, 255)",
              "rgb(255, 255, 255)"
            ],
            "decimals": 0,
            "pattern": "Rank"
          }
        ],
        "links": [],
        "pageSize": 1000,
        "title": "[[full_name]] Companies statistics ([[metric]], Range: [[period_name]]), bots excluded",
        "type": "table",
        "fontSize": "90%",
        "interval": "",
        "options": {
          
        },
        "scroll": true
      },
      {
        "content": "${docs:raw}",
        "gridPos": {
          "h": 11,
          "w": 24,
          "x": 0,
          "y": 22
        },
        "id": 11,
        "links": [],
        "mode": "html",
        "options": {
          
        },
        "title": "Dashboard documentation",
        "type": "text"
      }
    ],
    "refresh": false,
    "uid": "5",
    "annotations": {
      "list": [
        {
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations \u0026 Alerts",
          "type": "dashboard",
          "builtIn": 1,
          "datasource": "-- Grafana --",
          "enable": true
        }
      ]
    },
    "gnetId": null
  }


slug: company-commits-table
title: Company Commits Table
created: 2024-04-09 11:21:31.313553084+00:00
updated: 2024-04-09 11:21:31.313553164+00:00
uid: 56
data:
  {
    "timezone": "",
    "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"
      ]
    },
    "gnetId": null,
    "graphTooltip": 0,
    "refresh": false,
    "tags": [
      "dashboard",
      "cii",
      "table",
      "companies"
    ],
    "templating": {
      "list": [
        {
          "datasource": "psql",
          "multi": false,
          "skipUrlSync": true,
          "sort": 0,
          "type": "query",
          "useTags": false,
          "hide": 2,
          "includeAll": false,
          "name": "full_name",
          "refresh": 1,
          "regex": "",
          "tags": [],
          "tagsQuery": "",
          "allValue": null,
          "options": [],
          "query": "select value_s from gha_vars where name = 'full_name'",
          "current": {
            "text": "Envoy",
            "value": "Envoy"
          },
          "label": null,
          "tagValuesQuery": ""
        },
        {
          "refresh": 1,
          "skipUrlSync": false,
          "type": "query",
          "allValue": "null",
          "hide": 0,
          "label": "Repository groups",
          "name": "repogroups",
          "options": [],
          "regex": "",
          "sort": 0,
          "tagValuesQuery": "",
          "tags": [],
          "tagsQuery": "",
          "current": {
            "value": [
              "$__all"
            ],
            "text": "All"
          },
          "datasource": "psql",
          "includeAll": true,
          "query": "select repo_group_name from trepo_groups order by 1",
          "multi": true,
          "useTags": false
        },
        {
          "current": {
            "text": "\u003ch1 id=\"dashboard-header\"\u003eEnvoy company commits table dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eCompany commits metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/company_commits_data.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003eCompany commits table\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/envoy/company-commits-table.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows statistics about company commits.\u003c/li\u003e\n\u003cli\u003eYou can select date range to show company commits for this period.\u003c/li\u003e\n\u003cli\u003eYou can select multiple repository groups or all of them in a multi select dowp down.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eYou can select multiple companies or all of them in a multi select dowp down.\u003c/li\u003e\n\u003cli\u003eWe are showing top 255 most active companies in the drop-down list.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots activity, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003cli\u003eWe are determining user's company affiliation from \u003ca href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\"\u003ethis file\u003c/a\u003e, which is imported from \u003ccode\u003ecncf/gitdm\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e",
            "value": "\u003ch1 id=\"dashboard-header\"\u003eEnvoy company commits table dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eCompany commits metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/company_commits_data.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003eCompany commits table\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/envoy/company-commits-table.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows statistics about company commits.\u003c/li\u003e\n\u003cli\u003eYou can select date range to show company commits for this period.\u003c/li\u003e\n\u003cli\u003eYou can select multiple repository groups or all of them in a multi select dowp down.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eYou can select multiple companies or all of them in a multi select dowp down.\u003c/li\u003e\n\u003cli\u003eWe are showing top 255 most active companies in the drop-down list.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots activity, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003cli\u003eWe are determining user's company affiliation from \u003ca href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\"\u003ethis file\u003c/a\u003e, which is imported from \u003ccode\u003ecncf/gitdm\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e"
          },
          "name": "docs",
          "tags": [],
          "hide": 2,
          "multi": false,
          "options": [],
          "query": "select value_s from gha_vars where name = 'company_commits_docs_html'",
          "skipUrlSync": true,
          "sort": 0,
          "tagValuesQuery": "",
          "useTags": false,
          "includeAll": false,
          "regex": "",
          "tagsQuery": "",
          "type": "query",
          "allValue": null,
          "datasource": "psql",
          "label": null,
          "refresh": 1
        },
        {
          "datasource": "psql",
          "label": "Companies",
          "refresh": 1,
          "regex": "",
          "skipUrlSync": false,
          "tagValuesQuery": "",
          "useTags": false,
          "options": [],
          "sort": 0,
          "type": "query",
          "allValue": "null",
          "current": {
            "text": "All",
            "value": [
              "$__all"
            ]
          },
          "includeAll": true,
          "multi": true,
          "name": "companies",
          "hide": 0,
          "query": "select companies_name from tcompanies order by time asc",
          "tags": [],
          "tagsQuery": ""
        }
      ]
    },
    "version": 13,
    "annotations": {
      "list": [
        {
          "name": "Annotations \u0026 Alerts",
          "type": "dashboard",
          "builtIn": 1,
          "datasource": "-- Grafana --",
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)"
        }
      ]
    },
    "id": 66,
    "iteration": 1557388627645,
    "links": [],
    "panels": [
      {
        "styles": [
          {
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ],
            "decimals": 2,
            "linkUrl": "https://github.com/${__cell_4}/${__cell_5}/commit/${__cell_6}",
            "alias": "Commit link",
            "link": true,
            "linkTooltip": "",
            "type": "string",
            "colorMode": null,
            "mappingType": 1,
            "thresholds": [],
            "unit": "short",
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "pattern": "Message",
            "linkTargetBlank": true
          },
          {
            "mappingType": 1,
            "pattern": "Commit Org",
            "thresholds": [],
            "type": "hidden",
            "colorMode": null,
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "decimals": 2,
            "alias": "",
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ],
            "unit": "short"
          },
          {
            "decimals": 2,
            "mappingType": 1,
            "thresholds": [],
            "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",
            "pattern": "Commit Repo",
            "type": "hidden"
          },
          {
            "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,
            "thresholds": [],
            "unit": "short",
            "alias": "",
            "mappingType": 1,
            "pattern": "Commit SHA",
            "type": "hidden",
            "colorMode": null
          },
          {
            "decimals": 2,
            "mappingType": 1,
            "pattern": "Date",
            "thresholds": [],
            "alias": "",
            "dateFormat": "MM/DD/YY h:mm:ss a",
            "type": "date",
            "unit": "short",
            "colorMode": null,
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ]
          },
          {
            "type": "number",
            "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": []
          }
        ],
        "targets": [
          {
            "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]]))",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                },
                {
                  "params": [],
                  "type": "mean"
                }
              ]
            ],
            "alias": "",
            "dsType": "influxdb",
            "groupBy": [
              {
                "params": [
                  "$__interval"
                ],
                "type": "time"
              },
              {
                "params": [
                  "null"
                ],
                "type": "fill"
              }
            ],
            "orderByTime": "ASC",
            "resultFormat": "table",
            "tags": [],
            "format": "table",
            "policy": "default",
            "query": "",
            "refId": "A"
          }
        ],
        "timeShift": null,
        "title": "[[full_name]] company commits table",
        "transform": "table",
        "gridPos": {
          "x": 0,
          "y": 0,
          "h": 25,
          "w": 24
        },
        "scroll": true,
        "showHeader": true,
        "transparent": false,
        "columns": [],
        "id": 1,
        "links": [],
        "pageSize": 30,
        "type": "table",
        "description": "",
        "fontSize": "90%",
        "hideTimeOverride": false,
        "datasource": "psql",
        "sort": {
          "col": 3,
          "desc": true
        },
        "timeFrom": null
      },
      {
        "gridPos": {
          "h": 12,
          "w": 24,
          "x": 0,
          "y": 25
        },
        "id": 11,
        "links": [],
        "mode": "html",
        "title": "Dashboard documentation",
        "type": "text",
        "content": "${docs:raw}"
      }
    ],
    "title": "Company Commits Table",
    "editable": true,
    "style": "dark",
    "time": {
      "from": "now-1M",
      "to": "now"
    },
    "uid": "56",
    "schemaVersion": 16
  }


slug: company-prs-in-repository-groups-table
title: Company PRs in Repository Groups Table
created: 2024-04-09 11:21:31.320653496+00:00
updated: 2024-04-09 11:21:31.320653576+00:00
uid: 55
data:
  {
    "annotations": {
      "list": [
        {
          "datasource": "-- Grafana --",
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations \u0026 Alerts",
          "type": "dashboard",
          "builtIn": 1
        }
      ]
    },
    "editable": true,
    "iteration": 1568187874942,
    "time": {
      "from": "now-5y",
      "to": "now"
    },
    "timepicker": {
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ],
      "hidden": true
    },
    "tags": [
      "dashboard",
      "cii",
      "table",
      "companies",
      "repogroups"
    ],
    "uid": "55",
    "version": 2,
    "gnetId": null,
    "graphTooltip": 0,
    "id": 6,
    "panels": [
      {
        "description": "Shows company PRs in the given repository groups",
        "gridPos": {
          "w": 24,
          "x": 0,
          "y": 0,
          "h": 22
        },
        "interval": "",
        "pageSize": 200,
        "transform": "table",
        "type": "table",
        "hideTimeOverride": true,
        "id": 1,
        "links": [],
        "showHeader": true,
        "sort": {
          "col": 0,
          "desc": false
        },
        "styles": [
          {
            "alias": "Time",
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "decimals": null,
            "pattern": "Time",
            "type": "hidden"
          },
          {
            "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",
            "pattern": "Opened PRs",
            "type": "number",
            "decimals": 0,
            "mappingType": 1,
            "thresholds": [],
            "unit": "none"
          },
          {
            "thresholds": [],
            "type": "string",
            "unit": "none",
            "alias": "",
            "colorMode": null,
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ],
            "decimals": 2,
            "pattern": "/.*/"
          }
        ],
        "columns": [],
        "datasource": "psql",
        "fontSize": "80%",
        "scroll": true,
        "options": {
          
        },
        "targets": [
          {
            "group": [],
            "orderByTime": "ASC",
            "resultFormat": "table",
            "tags": [],
            "alias": "",
            "format": "table",
            "groupBy": [
              {
                "params": [
                  "$__interval"
                ],
                "type": "time"
              },
              {
                "params": [
                  "null"
                ],
                "type": "fill"
              }
            ],
            "metricColumn": "none",
            "policy": "default",
            "rawQuery": true,
            "rawSql": "select\n  row_number() over (order by value desc, split_part(name, '$$$', 3) asc) as \"Rank\",\n  split_part(name, '$$$', 2) as \"Company\",\n  split_part(name, '$$$', 1) as \"Repository group\",\n  split_part(name, '$$$', 3) as \"GitHub ID\",\n  split_part(name, '$$$', 4) as \"User names\",\n  split_part(name, '$$$', 6) as \"Country\",\n  value as \"Opened PRs\"\nfrom\n  scompany_prs\nwhere\n  period = '[[period]]'\n  and ('[[repogroups:csv]]' = 'null' or split_part(name, '$$$', 1) in ([[repogroups]]))\n  and ('[[companies:csv]]' = 'null' or split_part(name, '$$$', 2) in ([[companies]]))\n  and ('[[countries:csv]]' = 'null' or split_part(name, '$$$', 6) in ([[countries]]))",
            "timeColumn": "time",
            "dsType": "influxdb",
            "where": [
              {
                "type": "macro",
                "name": "$__timeFilter",
                "params": []
              }
            ],
            "refId": "A",
            "query": "SELECT \"name\", \"value\" FROM \"top_commenters_[[repogroup]]_[[period]]\" WHERE $timeFilter",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                },
                {
                  "params": [],
                  "type": "mean"
                }
              ]
            ]
          }
        ],
        "title": "[[full_name]] company PRs (Range: [[period_name]])"
      },
      {
        "type": "text",
        "content": "${docs:raw}",
        "gridPos": {
          "h": 11,
          "w": 24,
          "x": 0,
          "y": 22
        },
        "id": 11,
        "links": [],
        "mode": "html",
        "options": {
          
        },
        "title": "Dashboard documentation"
      }
    ],
    "refresh": false,
    "links": [],
    "schemaVersion": 19,
    "style": "dark",
    "templating": {
      "list": [
        {
          "allValue": null,
          "refresh": 1,
          "regex": "",
          "skipUrlSync": false,
          "tagValuesQuery": "",
          "useTags": false,
          "datasource": "psql",
          "hide": 0,
          "multi": false,
          "tagsQuery": "",
          "definition": "",
          "label": "Range",
          "name": "period_name",
          "sort": 0,
          "tags": [],
          "type": "query",
          "current": {
            "text": "Last decade",
            "value": "Last decade"
          },
          "includeAll": false,
          "options": [],
          "query": "select quick_ranges_name from tquick_ranges order by time"
        },
        {
          "query": "select quick_ranges_suffix from tquick_ranges where quick_ranges_name = '[[period_name]]'",
          "tags": [],
          "allValue": null,
          "current": {
            "text": "y10",
            "value": "y10"
          },
          "label": null,
          "options": [],
          "definition": "",
          "tagsQuery": "",
          "useTags": false,
          "type": "query",
          "datasource": "psql",
          "multi": false,
          "name": "period",
          "sort": 0,
          "skipUrlSync": true,
          "tagValuesQuery": "",
          "hide": 2,
          "includeAll": false,
          "refresh": 1,
          "regex": ""
        },
        {
          "current": {
            "text": "All",
            "value": [
              "$__all"
            ]
          },
          "query": "select repo_group_name from trepo_groups order by 1",
          "tagValuesQuery": "",
          "type": "query",
          "datasource": "psql",
          "definition": "",
          "includeAll": true,
          "label": "Repository groups",
          "multi": true,
          "name": "repogroups",
          "regex": "",
          "options": [],
          "skipUrlSync": false,
          "sort": 0,
          "tags": [],
          "tagsQuery": "",
          "allValue": "null",
          "hide": 0,
          "refresh": 1,
          "useTags": false
        },
        {
          "name": "full_name",
          "refresh": 1,
          "regex": "",
          "allValue": null,
          "current": {
            "text": "All CNCF",
            "value": "All CNCF"
          },
          "hide": 2,
          "includeAll": false,
          "multi": false,
          "skipUrlSync": true,
          "useTags": false,
          "datasource": "psql",
          "tags": [],
          "tagsQuery": "",
          "type": "query",
          "definition": "",
          "label": null,
          "query": "select value_s from gha_vars where name = 'full_name'",
          "tagValuesQuery": "",
          "options": [],
          "sort": 0
        },
        {
          "current": {
            "text": "\u003ch1 id=\"dashboard-header\"\u003eAll CNCF company PRs in repository groups dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/company_prs.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003ecompany_prs\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/all/company-prs-in-repository-groups.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows how many PRs were open by given company's developer in given repository groups\u003c/li\u003e\n\u003cli\u003eYou can select one, two or more companies or All to select all of them.\u003c/li\u003e\n\u003cli\u003eYou can select one, two or more repository groups or All to select all fo tem.\u003c/li\u003e\n\u003cli\u003eYou can select last day, month, week etc. range or date range between releases, for example \u003ccode\u003ev1.9 - v1.10\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eWe are determining user's company affiliation from \u003ca href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\"\u003ethis file\u003c/a\u003e, which is imported from \u003ccode\u003ecncf/gitdm\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e",
            "value": "\u003ch1 id=\"dashboard-header\"\u003eAll CNCF company PRs in repository groups dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/company_prs.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003ecompany_prs\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/all/company-prs-in-repository-groups.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows how many PRs were open by given company's developer in given repository groups\u003c/li\u003e\n\u003cli\u003eYou can select one, two or more companies or All to select all of them.\u003c/li\u003e\n\u003cli\u003eYou can select one, two or more repository groups or All to select all fo tem.\u003c/li\u003e\n\u003cli\u003eYou can select last day, month, week etc. range or date range between releases, for example \u003ccode\u003ev1.9 - v1.10\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eWe are determining user's company affiliation from \u003ca href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\"\u003ethis file\u003c/a\u003e, which is imported from \u003ccode\u003ecncf/gitdm\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e"
          },
          "datasource": "psql",
          "query": "select value_s from gha_vars where name = 'company_prs_docs_html'",
          "regex": "",
          "name": "docs",
          "sort": 0,
          "tags": [],
          "tagsQuery": "",
          "type": "query",
          "useTags": false,
          "hide": 2,
          "options": [],
          "refresh": 1,
          "allValue": null,
          "definition": "",
          "includeAll": false,
          "label": null,
          "multi": false,
          "skipUrlSync": true,
          "tagValuesQuery": ""
        },
        {
          "tagsQuery": "",
          "type": "query",
          "useTags": false,
          "hide": 0,
          "name": "companies",
          "tagValuesQuery": "",
          "query": "select companies_name from tcompanies order by time asc",
          "skipUrlSync": false,
          "includeAll": true,
          "multi": true,
          "options": [],
          "refresh": 1,
          "regex": "",
          "tags": [],
          "datasource": "psql",
          "definition": "",
          "label": "Companies",
          "sort": 0,
          "allValue": "null",
          "current": {
            "text": "All",
            "value": [
              "$__all"
            ]
          }
        },
        {
          "multi": true,
          "query": "select country_name from tcountries order by time",
          "sort": 0,
          "useTags": false,
          "current": {
            "text": "All",
            "value": [
              "$__all"
            ]
          },
          "datasource": "psql",
          "includeAll": true,
          "tagValuesQuery": "",
          "tagsQuery": "",
          "definition": "select country_name from tcountries order by time",
          "label": "Countries",
          "regex": "",
          "type": "query",
          "name": "countries",
          "skipUrlSync": false,
          "tags": [],
          "refresh": 1,
          "allValue": "null",
          "hide": 0,
          "options": []
        }
      ]
    },
    "timezone": "",
    "title": "Company PRs in Repository Groups Table"
  }


slug: company-statistics-by-repository-group
title: Company Statistics by Repository Group
created: 2024-04-09 11:21:31.330635799+00:00
updated: 2024-04-09 11:21:31.330635859+00:00
uid: 4
data:
  {
    "annotations": {
      "list": [
        {
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "limit": 100,
          "name": "Annotations \u0026 Alerts",
          "showIn": 0,
          "builtIn": 1,
          "datasource": "-- Grafana --",
          "enable": true,
          "type": "dashboard"
        },
        {
          "tagsColumn": "title,description",
          "textColumn": "",
          "hide": false,
          "query": "SELECT title, description from annotations WHERE $timeFilter order by time asc",
          "showIn": 0,
          "limit": 100,
          "name": "Releases",
          "rawQuery": "select extract(epoch from time) AS time, title as text, description as tags from sannotations where $__timeFilter(time)",
          "titleColumn": "[[full_name]] release",
          "type": "alert",
          "datasource": "psql",
          "enable": true,
          "iconColor": "rgba(255, 96, 96, 1)"
        }
      ]
    },
    "timepicker": {
      "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 Statistics by Repository Group",
    "uid": "4",
    "version": 2,
    "editable": true,
    "graphTooltip": 0,
    "schemaVersion": 20,
    "panels": [
      {
        "points": false,
        "seriesOverrides": [
          {
            "yaxis": 2,
            "alias": "All",
            "bars": false,
            "fill": 0,
            "lines": true,
            "linewidth": 1,
            "stack": false
          }
        ],
        "stack": true,
        "timeShift": null,
        "aliasColors": {
          
        },
        "bars": false,
        "datasource": "psql",
        "fill": 6,
        "fillGradient": 0,
        "lines": true,
        "links": [],
        "options": {
          "dataLinks": []
        },
        "pointradius": 5,
        "dashes": false,
        "id": 1,
        "nullPointMode": "null as zero",
        "title": "Companies [[metric]] metric ([[repogroup_name]], [[period]])",
        "tooltip": {
          "value_type": "individual",
          "shared": true,
          "sort": 2
        },
        "description": "Measures company [[metric]]. Independent means developers working on their own.",
        "spaceLength": 10,
        "transparent": true,
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "dashLength": 10,
        "decimals": 2,
        "linewidth": 0,
        "percentage": false,
        "targets": [
          {
            "dsType": "influxdb",
            "format": "time_series",
            "measurement": "sig_federation_d",
            "orderByTime": "ASC",
            "policy": "default",
            "query": "SELECT /^[[companies]]$/ FROM \"company_[[repogroup]]_[[metric]]_[[period]]\" WHERE $timeFilter",
            "tags": [],
            "alias": "",
            "rawQuery": true,
            "rawSql": "select\n  time,\n  ${companies:csv}\nfrom\n  scompany_activity\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'company[[repogroup]][[metric]]'\norder by\n  time",
            "refId": "B",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "groupBy": [],
            "resultFormat": "time_series"
          }
        ],
        "timeRegions": [],
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": []
        },
        "legend": {
          "alignAsTable": true,
          "min": true,
          "sortDesc": true,
          "max": true,
          "rightSide": true,
          "total": true,
          "values": true,
          "current": true,
          "hideEmpty": false,
          "show": true,
          "sideWidth": null,
          "sort": "avg",
          "avg": true,
          "hideZero": false
        },
        "steppedLine": false,
        "type": "graph",
        "thresholds": [],
        "gridPos": {
          "h": 17,
          "w": 24,
          "x": 0,
          "y": 0
        },
        "renderer": "flot",
        "timeFrom": null,
        "yaxes": [
          {
            "format": "short",
            "label": "Per company",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true
          },
          {
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true,
            "decimals": null,
            "format": "short",
            "label": "All"
          }
        ]
      },
      {
        "xaxis": {
          "values": [],
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true
        },
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "stack": true,
        "targets": [
          {
            "resultFormat": "time_series",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "alias": "",
            "dsType": "influxdb",
            "format": "time_series",
            "orderByTime": "ASC",
            "measurement": "sig_federation_d",
            "policy": "default",
            "rawQuery": true,
            "refId": "B",
            "rawSql": "select\n  time,\n  ${companies:csv}\nfrom\n  scompany_activity\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'company[[repogroup]][[metric]]'\norder by\n  time",
            "tags": [],
            "groupBy": [],
            "query": "SELECT /^[[companies]]$/ FROM \"company_[[repogroup]]_[[metric]]_[[period]]\" WHERE $timeFilter"
          }
        ],
        "timeRegions": [],
        "options": {
          "dataLinks": []
        },
        "spaceLength": 10,
        "dashLength": 10,
        "fill": 6,
        "id": 2,
        "renderer": "flot",
        "steppedLine": false,
        "bars": false,
        "decimals": 2,
        "legend": {
          "avg": true,
          "hideEmpty": false,
          "min": true,
          "rightSide": true,
          "sortDesc": true,
          "total": true,
          "values": true,
          "alignAsTable": true,
          "hideZero": false,
          "show": true,
          "sideWidth": null,
          "current": true,
          "max": true,
          "sort": "avg"
        },
        "tooltip": {
          "shared": true,
          "sort": 2,
          "value_type": "individual"
        },
        "dashes": false,
        "datasource": "psql",
        "seriesOverrides": [],
        "fillGradient": 0,
        "lines": true,
        "points": false,
        "thresholds": [],
        "transparent": true,
        "timeFrom": null,
        "title": "Companies [[metric]] metric ([[repogroup_name]], [[period]])",
        "type": "graph",
        "aliasColors": {
          
        },
        "linewidth": 0,
        "pointradius": 5,
        "nullPointMode": "null as zero",
        "percentage": true,
        "timeShift": null,
        "yaxes": [
          {
            "format": "short",
            "label": "",
            "logBase": 1,
            "max": "100",
            "min": "0",
            "show": true
          },
          {
            "label": "",
            "logBase": 1,
            "max": "100",
            "min": "0",
            "show": true,
            "decimals": null,
            "format": "short"
          }
        ],
        "description": "Measures company [[metric]]. Independent means developers working on their own.",
        "gridPos": {
          "x": 0,
          "y": 17,
          "h": 16,
          "w": 24
        },
        "links": []
      },
      {
        "content": "${docs:raw}",
        "gridPos": {
          "h": 14,
          "w": 24,
          "x": 0,
          "y": 33
        },
        "id": 11,
        "mode": "html",
        "datasource": null,
        "links": [],
        "options": {
          
        },
        "title": "Dashboard documentation",
        "type": "text"
      }
    ],
    "templating": {
      "list": [
        {
          "label": null,
          "multi": false,
          "sort": 0,
          "tagsQuery": "",
          "useTags": false,
          "hide": 2,
          "name": "full_name",
          "refresh": 1,
          "regex": "",
          "tagValuesQuery": "",
          "type": "query",
          "definition": "",
          "includeAll": false,
          "options": [],
          "skipUrlSync": true,
          "tags": [],
          "allValue": null,
          "current": {
            "text": "CII",
            "value": "CII"
          },
          "datasource": "psql",
          "query": "select value_s from gha_vars where name = 'full_name'"
        },
        {
          "type": "custom",
          "allValue": null,
          "includeAll": false,
          "multi": false,
          "options": [
            {
              "selected": false,
              "text": "Day",
              "value": "d"
            },
            {
              "selected": true,
              "text": "7 Days MA",
              "value": "d7"
            },
            {
              "selected": false,
              "text": "Week",
              "value": "w"
            },
            {
              "selected": false,
              "text": "Month",
              "value": "m"
            },
            {
              "value": "q",
              "selected": false,
              "text": "Quarter"
            },
            {
              "value": "y",
              "selected": false,
              "text": "Year"
            }
          ],
          "skipUrlSync": false,
          "current": {
            "selected": true,
            "text": "7 Days MA",
            "value": "d7"
          },
          "hide": 0,
          "label": "Period",
          "name": "period",
          "query": "d,w,m,q,y"
        },
        {
          "label": "Metric",
          "multi": false,
          "name": "metric",
          "allValue": null,
          "hide": 0,
          "options": [
            {
              "text": "All activity",
              "value": "activity",
              "selected": false
            },
            {
              "text": "Active authors",
              "value": "authors",
              "selected": false
            },
            {
              "selected": false,
              "text": "Issues created",
              "value": "issues"
            },
            {
              "selected": false,
              "text": "Pull requests created",
              "value": "prs"
            },
            {
              "selected": false,
              "text": "Reviews submitted",
              "value": "reviews"
            },
            {
              "text": "Commits",
              "value": "commits",
              "selected": false
            },
            {
              "selected": false,
              "text": "Commiters",
              "value": "committers"
            },
            {
              "text": "Pushes",
              "value": "pushes",
              "selected": false
            },
            {
              "selected": false,
              "text": "Pushers",
              "value": "pushers"
            },
            {
              "selected": true,
              "text": "Contributions",
              "value": "contributions"
            },
            {
              "selected": false,
              "text": "Contributors",
              "value": "contributors"
            },
            {
              "selected": false,
              "text": "Comments",
              "value": "comments"
            }
          ],
          "query": "activity,authors,issues,prs,commits,committers,pushers,pushes,comments,contributions,contributors,reviews",
          "skipUrlSync": false,
          "type": "custom",
          "current": {
            "selected": false,
            "tags": [],
            "text": "Contributions",
            "value": "contributions"
          },
          "includeAll": false
        },
        {
          "tags": [],
          "tagsQuery": "",
          "useTags": false,
          "multi": false,
          "query": "select all_repo_group_name from tall_repo_groups order by 1",
          "sort": 0,
          "tagValuesQuery": "",
          "datasource": "psql",
          "name": "repogroup_name",
          "options": [],
          "type": "query",
          "skipUrlSync": false,
          "current": {
            "selected": false,
            "text": "All",
            "value": "All"
          },
          "includeAll": false,
          "label": "Repository group",
          "refresh": 1,
          "allValue": null,
          "definition": "",
          "hide": 0,
          "regex": ""
        },
        {
          "type": "query",
          "useTags": false,
          "allValue": null,
          "skipUrlSync": true,
          "sort": 0,
          "label": "",
          "multi": false,
          "refresh": 1,
          "tagValuesQuery": "",
          "tags": [],
          "current": {
            "text": "all",
            "value": "all"
          },
          "datasource": "psql",
          "hide": 2,
          "tagsQuery": "",
          "options": [],
          "regex": "",
          "definition": "",
          "includeAll": false,
          "name": "repogroup",
          "query": "select all_repo_group_value from tall_repo_groups where all_repo_group_name = '[[repogroup_name]]'"
        },
        {
          "sort": 0,
          "tagValuesQuery": "",
          "tagsQuery": "",
          "definition": "",
          "hide": 0,
          "query": "select '\"' || companies_name || '\"' from tcompanies order by time asc",
          "name": "companies",
          "type": "query",
          "useTags": false,
          "label": "Companies",
          "multi": true,
          "options": [],
          "refresh": 1,
          "regex": "",
          "allValue": "",
          "datasource": "psql",
          "includeAll": true,
          "skipUrlSync": false,
          "tags": [],
          "current": {
            "text": "All",
            "value": [
              "$__all"
            ]
          }
        },
        {
          "query": "select value_s from gha_vars where name = 'companies_stats_docs_html'",
          "refresh": 1,
          "skipUrlSync": true,
          "tagValuesQuery": "",
          "tags": [],
          "useTags": false,
          "current": {
            "text": "\u003ch1 id=\"dashboard-header\"\u003eCII companies stats dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/company_activity.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003ecompany_activity\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/cii/companies-stats.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows various companies statistics.\u003c/li\u003e\n\u003cli\u003eContributor is defined as somebody who made a review, comment, commit, created PR or issue.\u003c/li\u003e\n\u003cli\u003eContribution is a review, comment, commit, issue or PR.\u003c/li\u003e\n\u003cli\u003eYou can select statistic from the metrics drop down (All activity means all events registered by GitHub).\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary statistics for all of them combined.\u003c/li\u003e\n\u003cli\u003eYou can select multiple companies or all of them in a multi select dowp down.\u003c/li\u003e\n\u003cli\u003eWe are showing top 255 most active companies in the drop-down list.\u003c/li\u003e\n\u003cli\u003eSelecting period (for example week) means that dashboard will show data in those periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots activity, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003cli\u003eWe are determining user's company affiliation from \u003ca href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\"\u003ethis file\u003c/a\u003e, which is imported from \u003ccode\u003ecncf/gitdm\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e",
            "value": "\u003ch1 id=\"dashboard-header\"\u003eCII companies stats dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/company_activity.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003ecompany_activity\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/cii/companies-stats.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows various companies statistics.\u003c/li\u003e\n\u003cli\u003eContributor is defined as somebody who made a review, comment, commit, created PR or issue.\u003c/li\u003e\n\u003cli\u003eContribution is a review, comment, commit, issue or PR.\u003c/li\u003e\n\u003cli\u003eYou can select statistic from the metrics drop down (All activity means all events registered by GitHub).\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary statistics for all of them combined.\u003c/li\u003e\n\u003cli\u003eYou can select multiple companies or all of them in a multi select dowp down.\u003c/li\u003e\n\u003cli\u003eWe are showing top 255 most active companies in the drop-down list.\u003c/li\u003e\n\u003cli\u003eSelecting period (for example week) means that dashboard will show data in those periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots activity, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003cli\u003eWe are determining user's company affiliation from \u003ca href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\"\u003ethis file\u003c/a\u003e, which is imported from \u003ccode\u003ecncf/gitdm\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e"
          },
          "includeAll": false,
          "name": "docs",
          "regex": "",
          "sort": 0,
          "datasource": "psql",
          "definition": "",
          "hide": 2,
          "label": null,
          "tagsQuery": "",
          "allValue": null,
          "options": [],
          "type": "query",
          "multi": false
        }
      ]
    },
    "time": {
      "from": "now-2y",
      "to": "now"
    },
    "gnetId": null,
    "id": 7,
    "iteration": 1572090630614,
    "links": [],
    "style": "dark",
    "tags": [
      "companies",
      "dashboard",
      "cii"
    ]
  }


slug: countries-statistics-in-repository-groups
title: Countries Statistics in Repository Groups
created: 2024-04-09 11:21:31.346925907+00:00
updated: 2024-04-09 11:21:31.346926018+00:00
uid: 50
data:
  {
    "graphTooltip": 0,
    "links": [],
    "timezone": "",
    "version": 2,
    "timepicker": {
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ]
    },
    "id": 64,
    "iteration": 1536910182172,
    "panels": [
      {
        "aliasColors": {
          
        },
        "bars": true,
        "decimals": null,
        "gridPos": {
          "x": 0,
          "y": 0,
          "h": 21,
          "w": 24
        },
        "pointradius": 5,
        "steppedLine": true,
        "dashes": false,
        "linewidth": 0,
        "links": [],
        "timeShift": null,
        "title": "[[full_name]] [[metric]] countries stats ([[repogroup_name]])",
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": []
        },
        "thresholds": [],
        "fill": 3,
        "percentage": false,
        "points": false,
        "renderer": "flot",
        "seriesOverrides": [],
        "spaceLength": 10,
        "stack": true,
        "dashLength": 10,
        "datasource": "psql",
        "type": "graph",
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "nullPointMode": "null as zero",
        "tooltip": {
          "shared": true,
          "sort": 2,
          "value_type": "individual"
        },
        "yaxes": [
          {
            "max": null,
            "min": "0",
            "show": true,
            "decimals": null,
            "format": "short",
            "label": "Value",
            "logBase": 1
          },
          {
            "format": "short",
            "label": "",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true
          }
        ],
        "description": "[[full_name]] [[metric]] countries stats ([[repogroup_name]])",
        "id": 2,
        "lines": false,
        "timeFrom": null,
        "legend": {
          "max": true,
          "rightSide": true,
          "show": true,
          "sort": "avg",
          "sortDesc": true,
          "total": false,
          "values": true,
          "alignAsTable": true,
          "avg": true,
          "current": true,
          "min": true
        },
        "targets": [
          {
            "policy": "default",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "tags": [],
            "measurement": "notused",
            "orderByTime": "ASC",
            "format": "time_series",
            "groupBy": [],
            "rawQuery": true,
            "rawSql": "select\n  time,\n  ${countries:csv}\nfrom\n  s[[cum]]\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = '[[cum]][[repogroup]][[metric]]'\norder by\n  time",
            "refId": "A",
            "resultFormat": "time_series",
            "alias": "",
            "dsType": "influxdb"
          }
        ]
      },
      {
        "linewidth": 1,
        "steppedLine": false,
        "timeFrom": null,
        "links": [],
        "percentage": false,
        "bars": false,
        "dashes": false,
        "id": 4,
        "stack": false,
        "thresholds": [],
        "tooltip": {
          "shared": true,
          "sort": 2,
          "value_type": "individual"
        },
        "xaxis": {
          "values": [],
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true
        },
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "datasource": "psql",
        "fill": 3,
        "nullPointMode": "null as zero",
        "type": "graph",
        "description": "[[full_name]] [[metric]] countries stats ([[repogroup_name]])",
        "seriesOverrides": [],
        "timeShift": null,
        "legend": {
          "avg": true,
          "show": true,
          "min": true,
          "rightSide": true,
          "sort": "avg",
          "sortDesc": true,
          "total": false,
          "alignAsTable": true,
          "current": true,
          "max": true,
          "values": true
        },
        "pointradius": 5,
        "targets": [
          {
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "tags": [],
            "dsType": "influxdb",
            "format": "time_series",
            "refId": "A",
            "orderByTime": "ASC",
            "policy": "default",
            "rawQuery": true,
            "rawSql": "select\n  time,\n  ${countries:csv}\nfrom\n  s[[cum]]\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = '[[cum]][[repogroup]][[metric]]'\norder by\n  time",
            "resultFormat": "time_series",
            "alias": "",
            "groupBy": [],
            "measurement": "notused"
          }
        ],
        "spaceLength": 10,
        "aliasColors": {
          
        },
        "dashLength": 10,
        "lines": true,
        "decimals": null,
        "gridPos": {
          "h": 21,
          "w": 24,
          "x": 0,
          "y": 21
        },
        "yaxes": [
          {
            "decimals": null,
            "format": "short",
            "label": "Value",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true
          },
          {
            "show": false,
            "format": "short",
            "label": "",
            "logBase": 1,
            "max": null,
            "min": "0"
          }
        ],
        "points": false,
        "renderer": "flot",
        "title": "[[full_name]] [[metric]] countries stats ([[repogroup_name]])"
      },
      {
        "description": "[[full_name]] [[metric]] countries stats ([[repogroup_name]])",
        "legend": {
          "max": true,
          "min": true,
          "sort": "avg",
          "total": false,
          "values": true,
          "alignAsTable": true,
          "current": true,
          "show": true,
          "sortDesc": true,
          "avg": true,
          "rightSide": true
        },
        "percentage": true,
        "datasource": "psql",
        "fill": 3,
        "points": false,
        "aliasColors": {
          
        },
        "targets": [
          {
            "policy": "default",
            "rawQuery": true,
            "resultFormat": "time_series",
            "select": [
              [
                {
                  "type": "field",
                  "params": [
                    "value"
                  ]
                }
              ]
            ],
            "tags": [],
            "alias": "",
            "orderByTime": "ASC",
            "groupBy": [],
            "measurement": "notused",
            "rawSql": "select\n  time,\n  ${countries:csv}\nfrom\n  s[[cum]]\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = '[[cum]][[repogroup]][[metric]]'\norder by\n  time",
            "refId": "A",
            "dsType": "influxdb",
            "format": "time_series"
          }
        ],
        "type": "graph",
        "xaxis": {
          "name": null,
          "show": true,
          "values": [],
          "buckets": null,
          "mode": "time"
        },
        "dashLength": 10,
        "seriesOverrides": [],
        "spaceLength": 10,
        "steppedLine": true,
        "bars": true,
        "timeShift": null,
        "tooltip": {
          "shared": true,
          "sort": 2,
          "value_type": "individual"
        },
        "dashes": false,
        "linewidth": 0,
        "stack": true,
        "timeFrom": null,
        "title": "[[full_name]] [[metric]] countries stats ([[repogroup_name]])",
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "decimals": null,
        "pointradius": 5,
        "yaxes": [
          {
            "logBase": 1,
            "max": "100",
            "min": "0",
            "show": true,
            "decimals": null,
            "format": "short",
            "label": "Value"
          },
          {
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true,
            "format": "short",
            "label": ""
          }
        ],
        "links": [],
        "id": 3,
        "lines": false,
        "nullPointMode": "null as zero",
        "renderer": "flot",
        "thresholds": [],
        "gridPos": {
          "y": 42,
          "h": 21,
          "w": 24,
          "x": 0
        }
      },
      {
        "title": "Dashboard documentation",
        "type": "text",
        "content": "${docs:raw}",
        "gridPos": {
          "w": 24,
          "x": 0,
          "y": 63,
          "h": 16
        },
        "id": 1,
        "links": [],
        "mode": "html"
      }
    ],
    "templating": {
      "list": [
        {
          "tagValuesQuery": "",
          "useTags": false,
          "allValue": null,
          "name": "full_name",
          "query": "select value_s from gha_vars where name = 'full_name'",
          "options": [],
          "tags": [],
          "tagsQuery": "",
          "current": {
            "text": "All CNCF",
            "value": "All CNCF"
          },
          "datasource": "psql",
          "includeAll": false,
          "type": "query",
          "label": null,
          "skipUrlSync": true,
          "sort": 0,
          "regex": "",
          "hide": 2,
          "multi": false,
          "refresh": 1
        },
        {
          "datasource": "psql",
          "query": "select split_part(cumperiod_name, '/', 2) from tcumperiods where cumperiod_name like '[[cum]]/%';",
          "sort": 0,
          "tagValuesQuery": "",
          "tagsQuery": "",
          "useTags": false,
          "allValue": null,
          "hide": 0,
          "includeAll": false,
          "regex": "",
          "tags": [],
          "type": "query",
          "label": "Period",
          "multi": false,
          "name": "period_name",
          "skipUrlSync": false,
          "current": {
            "tags": [],
            "text": "Quarter",
            "value": "Quarter"
          },
          "options": [],
          "refresh": 1
        },
        {
          "label": "Countries",
          "query": "select '\"' || country_name || '\"' from tcountries order by time asc",
          "regex": "",
          "skipUrlSync": false,
          "current": {
            "text": "All",
            "value": "$__all"
          },
          "hide": 0,
          "datasource": "psql",
          "sort": 0,
          "includeAll": true,
          "name": "countries",
          "options": [],
          "refresh": 1,
          "tagValuesQuery": "",
          "tags": [],
          "tagsQuery": "",
          "type": "query",
          "allValue": "",
          "multi": true,
          "useTags": false
        },
        {
          "options": [],
          "query": "select all_repo_group_name from tall_repo_groups order by 1",
          "refresh": 1,
          "tags": [],
          "useTags": false,
          "hide": 0,
          "includeAll": false,
          "datasource": "psql",
          "multi": false,
          "tagsQuery": "",
          "allValue": null,
          "current": {
            "tags": [],
            "text": "All",
            "value": "All"
          },
          "type": "query",
          "label": "Repository group",
          "name": "repogroup_name",
          "sort": 0,
          "tagValuesQuery": "",
          "regex": "",
          "skipUrlSync": false
        },
        {
          "multi": false,
          "options": [],
          "sort": 0,
          "tags": [],
          "tagsQuery": "",
          "current": {
            "text": "all",
            "value": "all"
          },
          "hide": 2,
          "includeAll": false,
          "datasource": "psql",
          "regex": "",
          "tagValuesQuery": "",
          "query": "select all_repo_group_value from tall_repo_groups where all_repo_group_name = '[[repogroup_name]]'",
          "refresh": 1,
          "useTags": false,
          "skipUrlSync": true,
          "type": "query",
          "allValue": null,
          "label": "",
          "name": "repogroup"
        },
        {
          "allValue": null,
          "hide": 0,
          "skipUrlSync": false,
          "query": "contributions,contributors,users,events,committers,commits,rcommitters,rcommits,prcreators,prs,issuecreators,issues,commenters,comments,reviewers,reviews,watchers,watches,forkers,forks",
          "type": "custom",
          "current": {
            "value": "rcommitters",
            "selected": true,
            "tags": [],
            "text": "Committers"
          },
          "includeAll": false,
          "label": "Metric",
          "multi": false,
          "name": "metric",
          "options": [
            {
              "selected": false,
              "text": "Contributions",
              "value": "contributions"
            },
            {
              "selected": false,
              "text": "Contributors",
              "value": "contributors"
            },
            {
              "value": "users",
              "selected": false,
              "text": "Users"
            },
            {
              "selected": false,
              "text": "Activity",
              "value": "events"
            },
            {
              "selected": false,
              "text": "Pushers",
              "value": "committers"
            },
            {
              "value": "commits",
              "selected": false,
              "text": "Pushes"
            },
            {
              "selected": true,
              "text": "Committers",
              "value": "rcommitters"
            },
            {
              "selected": false,
              "text": "Commits",
              "value": "rcommits"
            },
            {
              "selected": false,
              "text": "PR creators",
              "value": "prcreators"
            },
            {
              "text": "PRs",
              "value": "prs",
              "selected": false
            },
            {
              "selected": false,
              "text": "Issue creators",
              "value": "issuecreators"
            },
            {
              "selected": false,
              "text": "Issues",
              "value": "issues"
            },
            {
              "value": "commenters",
              "selected": false,
              "text": "Commenters"
            },
            {
              "selected": false,
              "text": "Comments",
              "value": "comments"
            },
            {
              "selected": false,
              "text": "Reviewers",
              "value": "reviewers"
            },
            {
              "text": "Reviews",
              "value": "reviews",
              "selected": false
            },
            {
              "selected": false,
              "text": "Watchers",
              "value": "watchers"
            },
            {
              "text": "Watches",
              "value": "watches",
              "selected": false
            },
            {
              "selected": false,
              "text": "Forkers",
              "value": "forkers"
            },
            {
              "selected": false,
              "text": "Forks",
              "value": "forks"
            }
          ]
        },
        {
          "hide": 0,
          "name": "cum",
          "query": "countries,countriescum",
          "skipUrlSync": false,
          "multi": false,
          "options": [
            {
              "selected": false,
              "text": "Yes",
              "value": "countriescum"
            },
            {
              "value": "countries",
              "selected": true,
              "text": "No"
            }
          ],
          "type": "custom",
          "allValue": null,
          "current": {
            "selected": true,
            "text": "No",
            "value": "countries"
          },
          "includeAll": false,
          "label": "Cumulative"
        },
        {
          "tagsQuery": "",
          "query": "select value_s from gha_vars where name = 'countries_stats_docs_html'",
          "regex": "",
          "tags": [],
          "multi": false,
          "options": [],
          "skipUrlSync": true,
          "current": {
            "value": "\u003ch1 id=\"dashboard-header\"\u003eAll CNCF countries stats dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/countries.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eCumulative metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/countries_cum.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003ecountries\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/all/countries-stats.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows contributor countries statistics (cumulative and in given periods).\u003c/li\u003e\n\u003cli\u003eContributor is defined as somebody who made a review, comment, commit, created PR or issue.\u003c/li\u003e\n\u003cli\u003eContribution is a review, comment, commit, issue or PR.\u003c/li\u003e\n\u003cli\u003eWe are determining contributor's country by using GitHub localization and searching for a country using \u003ca href=\"http://www.geonames.org\" target=\"_blank\"\u003egeonames\u003c/a\u003e database.\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary statistics for all of them combined.\u003c/li\u003e\n\u003cli\u003eYou can choose to display contributors, contributions, users, actvity, committers, commits etc.\u003c/li\u003e\n\u003cli\u003eYou can select cumulative statistics or statistics in given periods.\u003c/li\u003e\n\u003cli\u003eSelecting period (for example week) means that dashboard will show data in those periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots activity, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003c/ul\u003e",
            "text": "\u003ch1 id=\"dashboard-header\"\u003eAll CNCF countries stats dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/countries.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eCumulative metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/countries_cum.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003ecountries\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/all/countries-stats.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows contributor countries statistics (cumulative and in given periods).\u003c/li\u003e\n\u003cli\u003eContributor is defined as somebody who made a review, comment, commit, created PR or issue.\u003c/li\u003e\n\u003cli\u003eContribution is a review, comment, commit, issue or PR.\u003c/li\u003e\n\u003cli\u003eWe are determining contributor's country by using GitHub localization and searching for a country using \u003ca href=\"http://www.geonames.org\" target=\"_blank\"\u003egeonames\u003c/a\u003e database.\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary statistics for all of them combined.\u003c/li\u003e\n\u003cli\u003eYou can choose to display contributors, contributions, users, actvity, committers, commits etc.\u003c/li\u003e\n\u003cli\u003eYou can select cumulative statistics or statistics in given periods.\u003c/li\u003e\n\u003cli\u003eSelecting period (for example week) means that dashboard will show data in those periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots activity, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003c/ul\u003e"
          },
          "includeAll": false,
          "label": null,
          "datasource": "psql",
          "refresh": 1,
          "tagValuesQuery": "",
          "sort": 0,
          "type": "query",
          "useTags": false,
          "allValue": null,
          "hide": 2,
          "name": "docs"
        },
        {
          "current": {
            "text": "q",
            "value": "q"
          },
          "datasource": "psql",
          "hide": 2,
          "label": "",
          "name": "period",
          "options": [],
          "query": "select split_part(cumperiod_name, '/', 3) from tcumperiods where cumperiod_name like '[[cum]]/[[period_name]]/%';",
          "allValue": null,
          "regex": "",
          "skipUrlSync": true,
          "sort": 0,
          "tagValuesQuery": "",
          "type": "query",
          "refresh": 1,
          "tags": [],
          "useTags": false,
          "multi": false,
          "tagsQuery": "",
          "includeAll": false
        }
      ]
    },
    "title": "Countries Statistics in Repository Groups",
    "editable": true,
    "refresh": false,
    "style": "dark",
    "time": {
      "from": "now-3y",
      "to": "now-1M"
    },
    "uid": "50",
    "annotations": {
      "list": [
        {
          "type": "dashboard",
          "builtIn": 1,
          "datasource": "-- Grafana --",
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations \u0026 Alerts"
        },
        {
          "enable": true,
          "iconColor": "rgba(255, 96, 96, 1)",
          "textColumn": "",
          "type": "alert",
          "rawQuery": "select extract(epoch from time) AS time, title as text, description as tags from sannotations where $__timeFilter(time)",
          "showIn": 0,
          "tagsColumn": "title,description",
          "datasource": "psql",
          "hide": false,
          "limit": 100,
          "name": "Releases",
          "query": "SELECT title, description from annotations WHERE $timeFilter order by time asc",
          "titleColumn": "[[full_name]] Release"
        }
      ]
    },
    "gnetId": null,
    "schemaVersion": 16,
    "tags": [
      "dashboard",
      "cii"
    ]
  }


slug: dashboards
title: Dashboards
created: 2024-04-09 11:21:31.354012604+00:00
updated: 2024-04-09 11:21:31.354012694+00:00
uid: 8
data:
  {
    "editable": true,
    "time": {
      "from": "now-7d",
      "to": "now-1h"
    },
    "timezone": "",
    "annotations": {
      "list": [
        {
          "type": "dashboard",
          "builtIn": 1,
          "datasource": "-- Grafana --",
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations \u0026 Alerts"
        },
        {
          "type": "alert",
          "datasource": "psql",
          "limit": 100,
          "name": "Releases",
          "rawQuery": "select extract(epoch from time) AS time, title as text, description as tags from sannotations where $__timeFilter(time)",
          "showIn": 0,
          "textColumn": "",
          "titleColumn": "[[full_name]] release",
          "enable": true,
          "hide": false,
          "iconColor": "rgba(255, 96, 96, 1)",
          "query": "SELECT title, description from annotations WHERE $timeFilter order by time asc",
          "tagsColumn": "title,description"
        }
      ]
    },
    "refresh": "15m",
    "schemaVersion": 21,
    "style": "dark",
    "uid": "8",
    "description": "Home dashboard",
    "id": 9,
    "iteration": 1582187141069,
    "links": [],
    "templating": {
      "list": [
        {
          "current": {
            "text": "\u003ch1 id=\"-full_name-home-dashboard\"\u003eOCI Home dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003ePostgres \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/events.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eInfluxDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/opencontainers/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e (search for \u003ccode\u003ename: GitHub activity\u003c/code\u003e).\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/opencontainers/dashboards.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eDeveloper \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/dashboards/dashboards_devel.md\" target=\"_blank\"\u003edocumentation\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eDirect \u003ca href=\"https://opencontainers.cncftest.io\" target=\"_blank\"\u003elink\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eFirst we\u0026#39;re displaying links to all CNCF projects defined.\u003c/li\u003e\n\u003cli\u003eNext we\u0026#39;re showing current project\u0026#39;s hourly activity - this is the number of all GitHub events that happened for OCI project hourly.\u003c/li\u003e\n\u003cli\u003eThis also includes bots activity (most other dashboards skip bot activity).\u003c/li\u003e\n\u003cli\u003eNext we\u0026#39;re showing HTML panel that shows all CNCF projects icons and links.\u003c/li\u003e\n\u003cli\u003eNext there is a dashboard that shows a list of all dashboards defined for OCI project.\u003c/li\u003e\n\u003c/ul\u003e",
            "value": "\u003ch1 id=\"-full_name-home-dashboard\"\u003eOCI Home dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003ePostgres \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/events.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eInfluxDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/opencontainers/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e (search for \u003ccode\u003ename: GitHub activity\u003c/code\u003e).\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/opencontainers/dashboards.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eDeveloper \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/dashboards/dashboards_devel.md\" target=\"_blank\"\u003edocumentation\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eDirect \u003ca href=\"https://opencontainers.cncftest.io\" target=\"_blank\"\u003elink\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eFirst we\u0026#39;re displaying links to all CNCF projects defined.\u003c/li\u003e\n\u003cli\u003eNext we\u0026#39;re showing current project\u0026#39;s hourly activity - this is the number of all GitHub events that happened for OCI project hourly.\u003c/li\u003e\n\u003cli\u003eThis also includes bots activity (most other dashboards skip bot activity).\u003c/li\u003e\n\u003cli\u003eNext we\u0026#39;re showing HTML panel that shows all CNCF projects icons and links.\u003c/li\u003e\n\u003cli\u003eNext there is a dashboard that shows a list of all dashboards defined for OCI project.\u003c/li\u003e\n\u003c/ul\u003e"
          },
          "datasource": "psql",
          "definition": "",
          "hide": 2,
          "label": null,
          "useTags": false,
          "allValue": null,
          "tags": [],
          "tagValuesQuery": "",
          "options": [],
          "query": "select value_s from gha_vars where name = 'dashboards_docs_html'",
          "refresh": 1,
          "sort": 0,
          "type": "query",
          "name": "docs",
          "multi": false,
          "regex": "",
          "skipUrlSync": true,
          "tagsQuery": "",
          "includeAll": false
        },
        {
          "tagsQuery": "",
          "hide": 2,
          "label": null,
          "refresh": 1,
          "skipUrlSync": true,
          "query": "select value_s from gha_vars where name = 'full_name'",
          "sort": 0,
          "definition": "",
          "includeAll": false,
          "multi": false,
          "name": "full_name",
          "allValue": null,
          "datasource": "psql",
          "type": "query",
          "tags": [],
          "useTags": false,
          "current": {
            
          },
          "options": [],
          "regex": "",
          "tagValuesQuery": ""
        },
        {
          "useTags": false,
          "definition": "",
          "options": [],
          "includeAll": false,
          "hide": 2,
          "multi": false,
          "query": "select value_s from gha_vars where name = 'os_hostname'",
          "refresh": 1,
          "sort": 0,
          "tagValuesQuery": "",
          "tags": [],
          "current": {
            
          },
          "type": "query",
          "datasource": "psql",
          "label": null,
          "name": "hostname",
          "regex": "",
          "skipUrlSync": true,
          "tagsQuery": "",
          "allValue": null
        }
      ]
    },
    "title": "Dashboards",
    "version": 3,
    "gnetId": null,
    "graphTooltip": 0,
    "panels": [
      {
        "nullPointMode": "null",
        "pointradius": 1,
        "targets": [
          {
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "alias": "",
            "format": "time_series",
            "groupBy": [],
            "orderByTime": "ASC",
            "policy": "default",
            "rawQuery": true,
            "dsType": "influxdb",
            "query": "SELECT \"value\" FROM \"events_h\" WHERE $timeFilter",
            "rawSql": "select\n  time,\n  value as \"Number of GitHub events hourly\"\nfrom\n  sevents_h\nwhere\n  $__timeFilter(time)\norder by\n  time",
            "refId": "A",
            "resultFormat": "time_series",
            "tags": []
          }
        ],
        "timeShift": null,
        "tooltip": {
          "shared": false,
          "sort": 0,
          "value_type": "individual"
        },
        "description": "Numbers of GitHub events in all repositories hourly",
        "fillGradient": 0,
        "legend": {
          "current": true,
          "total": true,
          "values": true,
          "alignAsTable": true,
          "max": true,
          "min": true,
          "rightSide": false,
          "show": true,
          "avg": true
        },
        "type": "graph",
        "renderer": "flot",
        "xaxis": {
          "name": null,
          "show": true,
          "values": [
            "total"
          ],
          "buckets": null,
          "mode": "time"
        },
        "aliasColors": {
          
        },
        "linewidth": 1,
        "percentage": false,
        "steppedLine": true,
        "timeFrom": null,
        "transparent": true,
        "decimals": 0,
        "links": [
          {
            "title": "DevStats GitHub repository",
            "url": "https://github.com/cncf/devstats"
          }
        ],
        "seriesOverrides": [],
        "yaxis": {
          "alignLevel": null,
          "align": false
        },
        "spaceLength": 10,
        "stack": false,
        "timeRegions": [],
        "yaxes": [
          {
            "max": null,
            "min": "0",
            "show": true,
            "format": "short",
            "label": "Activity",
            "logBase": 1
          },
          {
            "show": true,
            "format": "short",
            "label": "",
            "logBase": 1,
            "max": null,
            "min": "0"
          }
        ],
        "datasource": "psql",
        "fill": 5,
        "gridPos": {
          "y": 0,
          "h": 6,
          "w": 20,
          "x": 0
        },
        "points": false,
        "title": "Hourly [[full_name]] activity on GitHub",
        "bars": false,
        "dashes": false,
        "hiddenSeries": false,
        "id": 2,
        "options": {
          "dataLinks": []
        },
        "dashLength": 10,
        "lines": true,
        "thresholds": []
      },
      {
        "content": "Please report any bugs by opening an issue on \u003ca href=\"https://github.com/cncf/devstats\"\u003ehttps://github.com/cncf/devstats\u003c/a\u003e",
        "description": "",
        "links": [],
        "title": "",
        "transparent": true,
        "datasource": null,
        "gridPos": {
          "h": 6,
          "w": 4,
          "x": 20,
          "y": 0
        },
        "height": 220,
        "id": 1,
        "mode": "html",
        "options": {
          
        },
        "type": "text"
      },
      {
        "id": 4,
        "options": {
          
        },
        "recent": false,
        "starred": false,
        "datasource": null,
        "description": "https://github.com/cncf/devstats",
        "headings": false,
        "limit": 50,
        "query": "",
        "search": true,
        "gridPos": {
          "h": 50,
          "w": 24,
          "x": 0,
          "y": 6
        },
        "links": [
          {
            "title": "devstats",
            "url": "https://github.com/cncf/devstats"
          }
        ],
        "folderId": 0,
        "tags": [
          "dashboard",
          "cii"
        ],
        "title": "All [[full_name]] Dashboards",
        "type": "dashlist"
      },
      {
        "content": "${docs:raw}",
        "id": 6,
        "mode": "html",
        "options": {
          
        },
        "title": "Dashboard documentation",
        "type": "text",
        "datasource": null,
        "gridPos": {
          "y": 46,
          "h": 12,
          "w": 24,
          "x": 0
        },
        "links": []
      }
    ],
    "tags": [
      "home",
      "all",
      "cii"
    ],
    "timepicker": {
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ],
      "nowDelay": "1h"
    }
  }


slug: developer-activity-counts-by-companies
title: Developer Activity Counts by Companies
created: 2024-04-09 11:21:31.362059947+00:00
updated: 2024-04-09 11:21:31.362060027+00:00
uid: 66
data:
  {
    "uid": "66",
    "graphTooltip": 0,
    "id": 11,
    "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"
      ]
    },
    "time": {
      "from": "now-5y",
      "to": "now"
    },
    "refresh": false,
    "schemaVersion": 19,
    "templating": {
      "list": [
        {
          "datasource": "psql",
          "multi": false,
          "refresh": 1,
          "useTags": false,
          "definition": "",
          "hide": 0,
          "name": "period_name",
          "sort": 0,
          "type": "query",
          "allValue": null,
          "current": {
            "text": "Last decade",
            "value": "Last decade"
          },
          "label": "Range",
          "options": [],
          "query": "select quick_ranges_name from tquick_ranges order by time",
          "tags": [],
          "includeAll": false,
          "regex": "",
          "skipUrlSync": false,
          "tagValuesQuery": "",
          "tagsQuery": ""
        },
        {
          "query": "comments,commit_comments,commits,events,pushes,contributions,issue_comments,issues,prs,merged_prs,review_comments,active_repos,reviews",
          "skipUrlSync": false,
          "type": "custom",
          "allValue": null,
          "hide": 0,
          "name": "metric",
          "options": [
            {
              "value": "comments",
              "selected": false,
              "text": "Comments"
            },
            {
              "selected": false,
              "text": "Commit comments",
              "value": "commit_comments"
            },
            {
              "selected": false,
              "text": "Commits",
              "value": "commits"
            },
            {
              "selected": false,
              "text": "GitHub Events",
              "value": "events"
            },
            {
              "value": "pushes",
              "selected": false,
              "text": "GitHub pushes"
            },
            {
              "selected": false,
              "text": "Issue comments",
              "value": "issue_comments"
            },
            {
              "selected": false,
              "text": "Issues",
              "value": "issues"
            },
            {
              "selected": false,
              "text": "PRs",
              "value": "prs"
            },
            {
              "selected": false,
              "text": "Merged PRs",
              "value": "merged_prs"
            },
            {
              "selected": false,
              "text": "Review comments",
              "value": "review_comments"
            },
            {
              "selected": false,
              "text": "Reviews submitted",
              "value": "reviews"
            },
            {
              "selected": true,
              "text": "Contributions",
              "value": "contributions"
            },
            {
              "selected": false,
              "text": "Active repositories",
              "value": "active_repos"
            }
          ],
          "current": {
            "text": "Contributions",
            "value": "contributions",
            "selected": true
          },
          "includeAll": false,
          "label": "Metric",
          "multi": false
        },
        {
          "name": "period",
          "refresh": 1,
          "tagValuesQuery": "",
          "tagsQuery": "",
          "current": {
            "value": "y10",
            "text": "y10"
          },
          "hide": 2,
          "includeAll": false,
          "label": null,
          "options": [],
          "sort": 0,
          "useTags": false,
          "allValue": null,
          "datasource": "psql",
          "definition": "",
          "multi": false,
          "type": "query",
          "query": "select quick_ranges_suffix from tquick_ranges where quick_ranges_name = '[[period_name]]'",
          "regex": "",
          "skipUrlSync": true,
          "tags": []
        },
        {
          "definition": "",
          "includeAll": false,
          "multi": false,
          "useTags": false,
          "hide": 2,
          "name": "full_name",
          "query": "select value_s from gha_vars where name = 'full_name'",
          "regex": "",
          "sort": 0,
          "tagValuesQuery": "",
          "tagsQuery": "",
          "type": "query",
          "allValue": null,
          "current": {
            "text": "All CNCF",
            "value": "All CNCF"
          },
          "datasource": "psql",
          "label": null,
          "options": [],
          "refresh": 1,
          "skipUrlSync": true,
          "tags": []
        },
        {
          "datasource": "psql",
          "includeAll": false,
          "options": [],
          "hide": 0,
          "label": "Repository group",
          "name": "repogroup_name",
          "query": "select all_repo_group_name from tall_repo_groups order by 1",
          "allValue": null,
          "definition": "",
          "regex": "",
          "sort": 0,
          "tags": [],
          "current": {
            "text": "All",
            "value": "All"
          },
          "multi": false,
          "refresh": 1,
          "skipUrlSync": false,
          "tagValuesQuery": "",
          "tagsQuery": "",
          "type": "query",
          "useTags": false
        },
        {
          "skipUrlSync": true,
          "tags": [],
          "name": "repogroup",
          "query": "select all_repo_group_value from tall_repo_groups where all_repo_group_name = '[[repogroup_name]]'",
          "hide": 2,
          "regex": "",
          "tagValuesQuery": "",
          "current": {
            "text": "all",
            "value": "all"
          },
          "datasource": "psql",
          "options": [],
          "refresh": 1,
          "sort": 0,
          "tagsQuery": "",
          "type": "query",
          "useTags": false,
          "includeAll": false,
          "label": "",
          "multi": false,
          "allValue": null,
          "definition": ""
        },
        {
          "label": null,
          "multi": false,
          "query": "select value_s from gha_vars where name = 'developer_company_stats_docs_html'",
          "sort": 0,
          "tagsQuery": "",
          "useTags": false,
          "definition": "select value_s from gha_vars where name = 'developer_company_stats_docs_html'",
          "includeAll": false,
          "datasource": "psql",
          "skipUrlSync": true,
          "allValue": null,
          "current": {
            "text": "\u003ch1 id=\"kubernetes-dashboard\"\u003eAll CNCF Developer Activity Counts by Repository Group dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMain metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/project_developer_stats.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eApproves metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/kubernetes/hist_approvers.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eReviews metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/kubernetes/hist_reviewers.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/kubernetes/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003eDeveloper activity\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/kubernetes/developer-activity-counts-by-repository-group.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows various developer metrics groupped by their affiliated companies.\u003c/li\u003e\n\u003cli\u003eYou can select last day, month, week etc. range or date range between releases, for example \u003ccode\u003ev1.9 - v1.10\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary for all of them.\u003c/li\u003e\n\u003cli\u003eYou can select country from a drop-down or summary for all countries.\u003c/li\u003e\n\u003cli\u003eYou can select company/companies from a drop-down or all to display all companies.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots when calculating statistics, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003cli\u003eWe are determining user's company affiliation from \u003ca href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\"\u003ethis file\u003c/a\u003e, which is imported from \u003ccode\u003ecncf/gitdm\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e",
            "value": "\u003ch1 id=\"kubernetes-dashboard\"\u003eAll CNCF Developer Activity Counts by Repository Group dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMain metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/project_developer_stats.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eApproves metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/kubernetes/hist_approvers.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eReviews metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/kubernetes/hist_reviewers.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/kubernetes/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003eDeveloper activity\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/kubernetes/developer-activity-counts-by-repository-group.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows various developer metrics groupped by their affiliated companies.\u003c/li\u003e\n\u003cli\u003eYou can select last day, month, week etc. range or date range between releases, for example \u003ccode\u003ev1.9 - v1.10\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary for all of them.\u003c/li\u003e\n\u003cli\u003eYou can select country from a drop-down or summary for all countries.\u003c/li\u003e\n\u003cli\u003eYou can select company/companies from a drop-down or all to display all companies.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots when calculating statistics, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003cli\u003eWe are determining user's company affiliation from \u003ca href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\"\u003ethis file\u003c/a\u003e, which is imported from \u003ccode\u003ecncf/gitdm\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e"
          },
          "options": [],
          "refresh": 1,
          "regex": "",
          "tagValuesQuery": "",
          "tags": [],
          "type": "query",
          "hide": 2,
          "name": "docs"
        },
        {
          "query": "select sub.value from (select country_value as value, 0 as ord from tcountries where country_name = '[[country_name]]' union select 'all', 1 as ord) sub order by sub.ord limit 1",
          "refresh": 1,
          "datasource": "psql",
          "definition": "",
          "name": "country",
          "label": "",
          "allValue": null,
          "current": {
            "text": "all",
            "value": "all"
          },
          "includeAll": false,
          "regex": "",
          "sort": 0,
          "tagValuesQuery": "",
          "tags": [],
          "type": "query",
          "hide": 2,
          "multi": false,
          "options": [],
          "skipUrlSync": true,
          "tagsQuery": "",
          "useTags": false
        },
        {
          "hide": 0,
          "includeAll": false,
          "tags": [],
          "allValue": "all",
          "current": {
            "text": "All",
            "value": "All"
          },
          "definition": "",
          "regex": "",
          "type": "query",
          "datasource": "psql",
          "label": "Country",
          "query": "select 'All' union select country_name from tcountries order by 1",
          "refresh": 1,
          "tagValuesQuery": "",
          "tagsQuery": "",
          "useTags": false,
          "multi": false,
          "name": "country_name",
          "options": [],
          "skipUrlSync": false,
          "sort": 0
        },
        {
          "tagsQuery": "",
          "type": "query",
          "useTags": false,
          "current": {
            "text": "All",
            "value": [
              "$__all"
            ]
          },
          "multi": true,
          "label": "Companies",
          "options": [],
          "sort": 0,
          "definition": "select companies_name from tcompanies order by time",
          "hide": 0,
          "includeAll": true,
          "regex": "",
          "allValue": "null",
          "datasource": "psql",
          "refresh": 1,
          "skipUrlSync": false,
          "tagValuesQuery": "",
          "tags": [],
          "name": "companies",
          "query": "select companies_name from tcompanies order by time"
        }
      ]
    },
    "timezone": "",
    "title": "Developer Activity Counts by Companies",
    "annotations": {
      "list": [
        {
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations \u0026 Alerts",
          "type": "dashboard",
          "builtIn": 1,
          "datasource": "-- Grafana --"
        }
      ]
    },
    "description": "",
    "gnetId": null,
    "panels": [
      {
        "links": [],
        "sort": {
          "col": 0,
          "desc": false
        },
        "gridPos": {
          "h": 20,
          "w": 24,
          "x": 0,
          "y": 0
        },
        "hideTimeOverride": true,
        "pageSize": 1000,
        "scroll": true,
        "transform": "table",
        "fontSize": "90%",
        "description": "",
        "interval": "",
        "options": {
          
        },
        "targets": [
          {
            "format": "table",
            "group": [],
            "query": "SELECT \"name\", \"value\" FROM \"developers_hist_[[metric]]_[[repogroup]]_[[period]]\" WHERE $timeFilter",
            "where": [
              {
                "params": [],
                "type": "macro",
                "name": "$__timeFilter"
              }
            ],
            "groupBy": [
              {
                "params": [
                  "$__interval"
                ],
                "type": "time"
              },
              {
                "type": "fill",
                "params": [
                  "null"
                ]
              }
            ],
            "timeColumn": "time",
            "resultFormat": "table",
            "tags": [],
            "alias": "",
            "dsType": "influxdb",
            "orderByTime": "ASC",
            "rawQuery": true,
            "rawSql": "select \n  sub.\"Rank\",\n  split_part(sub.name, '$$$', 1) as name,\n  split_part(sub.name, '$$$', 2) as \"Company\",\n  sub.value \nfrom (\n  select row_number() over (order by value desc, name asc) as \"Rank\",\n    name,\n    value\n  from\n    shdev\n  where\n    series = 'hdev_[[metric]][[repogroup]][[country]]'\n    and period = '[[period]]'\n    and ('[[companies:csv]]' = 'null' or split_part(name, '$$$', 2) in ([[companies]]))\n) sub",
            "metricColumn": "none",
            "policy": "default",
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                },
                {
                  "params": [],
                  "type": "mean"
                }
              ]
            ]
          }
        ],
        "type": "table",
        "datasource": "psql",
        "id": 1,
        "showHeader": true,
        "styles": [
          {
            "alias": "Time",
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "decimals": null,
            "pattern": "Time",
            "type": "hidden"
          },
          {
            "preserveFormat": false,
            "thresholds": [],
            "type": "string",
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ],
            "decimals": 2,
            "pattern": "name",
            "unit": "short",
            "alias": "GitHub login",
            "colorMode": null,
            "dateFormat": "YYYY-MM-DD HH:mm:ss"
          },
          {
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ],
            "pattern": "value",
            "thresholds": [],
            "alias": "Number",
            "colorMode": null,
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "decimals": 0,
            "type": "number",
            "unit": "none"
          },
          {
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "mappingType": 1,
            "colorMode": null,
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ],
            "decimals": 2,
            "pattern": "",
            "thresholds": [],
            "type": "number",
            "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": "Rank",
            "thresholds": [],
            "type": "string",
            "unit": "short",
            "alias": ""
          }
        ],
        "timeFrom": null,
        "title": "[[full_name]] Developers statistics ([[metric]], Range: [[period_name]], Repository group: [[repogroup_name]]), bots excluded",
        "columns": []
      },
      {
        "mode": "html",
        "options": {
          
        },
        "title": "Dashboard documentation",
        "type": "text",
        "content": "${docs:raw}",
        "gridPos": {
          "h": 13,
          "w": 24,
          "x": 0,
          "y": 20
        },
        "id": 3,
        "links": []
      }
    ],
    "style": "dark",
    "tags": [
      "dashboard",
      "cii",
      "repogroups",
      "table",
      "companies"
    ],
    "version": 2,
    "editable": true,
    "iteration": 1568183350598,
    "links": []
  }


slug: developer-activity-counts-by-repository-group-table
title: Developer Activity Counts by Repository Group Table
created: 2024-04-09 11:21:31.375989696+00:00
updated: 2024-04-09 11:21:31.375989787+00:00
uid: 9
data:
  {
    "id": 12,
    "timepicker": {
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ],
      "hidden": true,
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ]
    },
    "gnetId": null,
    "links": [],
    "schemaVersion": 19,
    "title": "Developer Activity Counts by Repository Group Table",
    "editable": true,
    "iteration": 1568183301397,
    "panels": [
      {
        "columns": [],
        "gridPos": {
          "h": 22,
          "w": 24,
          "x": 0,
          "y": 0
        },
        "hideTimeOverride": true,
        "id": 1,
        "showHeader": true,
        "title": "[[full_name]] Developers statistics ([[metric]], Range: [[period_name]], Repository group: [[repogroup_name]]), bots excluded",
        "interval": "",
        "links": [],
        "pageSize": 1000,
        "transform": "table",
        "description": "",
        "scroll": true,
        "sort": {
          "col": 0,
          "desc": false
        },
        "styles": [
          {
            "decimals": null,
            "pattern": "Time",
            "type": "hidden",
            "alias": "Time",
            "dateFormat": "YYYY-MM-DD HH:mm:ss"
          },
          {
            "colorMode": null,
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "unit": "short",
            "alias": "GitHub login",
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ],
            "decimals": 2,
            "pattern": "name",
            "preserveFormat": false,
            "thresholds": [],
            "type": "string"
          },
          {
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ],
            "decimals": 0,
            "alias": "Number",
            "colorMode": null,
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "pattern": "value",
            "thresholds": [],
            "type": "number",
            "unit": "none"
          },
          {
            "decimals": 0,
            "pattern": "/.*/",
            "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)"
            ]
          }
        ],
        "targets": [
          {
            "group": [],
            "tags": [],
            "rawSql": "select \n  sub.\"Rank\",\n  sub.name as name,\n  sub.value \nfrom (\n  select row_number() over (order by sum(value) desc, split_part(name, '$$$', 1) asc) as \"Rank\",\n    split_part(name, '$$$', 1) as name,\n    sum(value) as value\n  from\n    shdev\n  where\n    series = 'hdev_[[metric]][[repogroup]][[country]]'\n    and period = '[[period]]'\n  group by\n    split_part(name, '$$$', 1)\n) sub",
            "refId": "A",
            "resultFormat": "table",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "alias": "",
            "format": "table",
            "metricColumn": "none",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                },
                {
                  "params": [],
                  "type": "mean"
                }
              ]
            ],
            "dsType": "influxdb",
            "groupBy": [
              {
                "params": [
                  "$__interval"
                ],
                "type": "time"
              },
              {
                "params": [
                  "null"
                ],
                "type": "fill"
              }
            ],
            "policy": "default",
            "timeColumn": "time",
            "orderByTime": "ASC",
            "query": "SELECT \"name\", \"value\" FROM \"developers_hist_[[metric]]_[[repogroup]]_[[period]]\" WHERE $timeFilter",
            "rawQuery": true
          }
        ],
        "datasource": "psql",
        "fontSize": "90%",
        "options": {
          
        },
        "type": "table"
      },
      {
        "gridPos": {
          "h": 12,
          "w": 24,
          "x": 0,
          "y": 22
        },
        "id": 3,
        "links": [],
        "mode": "html",
        "options": {
          
        },
        "title": "Dashboard documentation",
        "type": "text",
        "content": "${docs:raw}"
      }
    ],
    "tags": [
      "dashboard",
      "cii",
      "repogroups",
      "table"
    ],
    "templating": {
      "list": [
        {
          "query": "select quick_ranges_name from tquick_ranges order by time",
          "refresh": 1,
          "hide": 0,
          "definition": "",
          "includeAll": false,
          "tagValuesQuery": "",
          "tags": [],
          "allValue": null,
          "datasource": "psql",
          "multi": false,
          "name": "period_name",
          "options": [],
          "skipUrlSync": false,
          "tagsQuery": "",
          "useTags": false,
          "current": {
            "text": "Last decade",
            "value": "Last decade"
          },
          "regex": "",
          "sort": 0,
          "type": "query",
          "label": "Range"
        },
        {
          "skipUrlSync": false,
          "type": "custom",
          "hide": 0,
          "name": "metric",
          "query": "comments,commit_comments,commits,events,pushes,contributions,issue_comments,issues,prs,merged_prs,review_comments,active_repos,reviews",
          "label": "Metric",
          "multi": false,
          "options": [
            {
              "text": "Comments",
              "value": "comments",
              "selected": false
            },
            {
              "selected": false,
              "text": "Commit comments",
              "value": "commit_comments"
            },
            {
              "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": "issue_comments"
            },
            {
              "selected": false,
              "text": "Issues",
              "value": "issues"
            },
            {
              "selected": false,
              "text": "PRs",
              "value": "prs"
            },
            {
              "selected": false,
              "text": "Merged PRs",
              "value": "merged_prs"
            },
            {
              "selected": false,
              "text": "Review comments",
              "value": "review_comments"
            },
            {
              "selected": false,
              "text": "Reviews submitted",
              "value": "reviews"
            },
            {
              "selected": true,
              "text": "Contributions",
              "value": "contributions"
            },
            {
              "selected": false,
              "text": "Active repositories",
              "value": "active_repos"
            }
          ],
          "allValue": null,
          "current": {
            "tags": [],
            "text": "Contributions",
            "value": "contributions",
            "selected": false
          },
          "includeAll": false
        },
        {
          "hide": 2,
          "name": "period",
          "refresh": 1,
          "skipUrlSync": true,
          "useTags": false,
          "tags": [],
          "datasource": "psql",
          "includeAll": false,
          "label": null,
          "multi": false,
          "sort": 0,
          "tagValuesQuery": "",
          "options": [],
          "query": "select quick_ranges_suffix from tquick_ranges where quick_ranges_name = '[[period_name]]'",
          "regex": "",
          "tagsQuery": "",
          "type": "query",
          "allValue": null,
          "current": {
            "text": "y10",
            "value": "y10"
          },
          "definition": ""
        },
        {
          "multi": false,
          "tagValuesQuery": "",
          "options": [],
          "query": "select value_s from gha_vars where name = 'full_name'",
          "regex": "",
          "tags": [],
          "current": {
            "text": "All CNCF",
            "value": "All CNCF"
          },
          "hide": 2,
          "includeAll": false,
          "name": "full_name",
          "type": "query",
          "useTags": false,
          "sort": 0,
          "allValue": null,
          "datasource": "psql",
          "refresh": 1,
          "skipUrlSync": true,
          "definition": "",
          "label": null,
          "tagsQuery": ""
        },
        {
          "datasource": "psql",
          "includeAll": false,
          "name": "repogroup_name",
          "query": "select all_repo_group_name from tall_repo_groups order by 1",
          "regex": "",
          "options": [],
          "tagValuesQuery": "",
          "tagsQuery": "",
          "current": {
            "text": "All",
            "value": "All"
          },
          "definition": "",
          "hide": 0,
          "refresh": 1,
          "skipUrlSync": false,
          "type": "query",
          "allValue": null,
          "label": "Repository group",
          "multi": false,
          "sort": 0,
          "tags": [],
          "useTags": false
        },
        {
          "type": "query",
          "refresh": 1,
          "definition": "",
          "options": [],
          "datasource": "psql",
          "includeAll": false,
          "multi": false,
          "skipUrlSync": true,
          "sort": 0,
          "tagValuesQuery": "",
          "allValue": null,
          "current": {
            "text": "all",
            "value": "all"
          },
          "name": "repogroup",
          "query": "select all_repo_group_value from tall_repo_groups where all_repo_group_name = '[[repogroup_name]]'",
          "regex": "",
          "tags": [],
          "tagsQuery": "",
          "useTags": false,
          "hide": 2,
          "label": ""
        },
        {
          "tagsQuery": "",
          "current": {
            "text": "\u003ch1 id=\"kubernetes-dashboard\"\u003eAll CNCF Developer Activity Counts by Repository Group dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMain metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/project_developer_stats.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eApproves metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/kubernetes/hist_approvers.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eReviews metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/kubernetes/hist_reviewers.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/kubernetes/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003eDeveloper activity\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/kubernetes/developer-activity-counts-by-repository-group.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows various developer metrics.\u003c/li\u003e\n\u003cli\u003eYou can select last day, month, week etc. range or date range between releases, for example \u003ccode\u003ev1.9 - v1.10\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary for all of them.\u003c/li\u003e\n\u003cli\u003eYou can select country from a drop-down or summary for all countries.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots when calculating statistics, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003c/ul\u003e",
            "value": "\u003ch1 id=\"kubernetes-dashboard\"\u003eAll CNCF Developer Activity Counts by Repository Group dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMain metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/project_developer_stats.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eApproves metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/kubernetes/hist_approvers.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eReviews metric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/kubernetes/hist_reviewers.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/kubernetes/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003eDeveloper activity\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/kubernetes/developer-activity-counts-by-repository-group.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows various developer metrics.\u003c/li\u003e\n\u003cli\u003eYou can select last day, month, week etc. range or date range between releases, for example \u003ccode\u003ev1.9 - v1.10\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary for all of them.\u003c/li\u003e\n\u003cli\u003eYou can select country from a drop-down or summary for all countries.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots when calculating statistics, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003c/ul\u003e"
          },
          "datasource": "psql",
          "hide": 2,
          "regex": "",
          "sort": 0,
          "tagValuesQuery": "",
          "name": "docs",
          "query": "select value_s from gha_vars where name = 'developers_summary_docs_html'",
          "skipUrlSync": true,
          "tags": [],
          "type": "query",
          "includeAll": false,
          "useTags": false,
          "allValue": null,
          "definition": "",
          "label": null,
          "multi": false,
          "options": [],
          "refresh": 1
        },
        {
          "allValue": null,
          "datasource": "psql",
          "hide": 2,
          "regex": "",
          "useTags": false,
          "includeAll": false,
          "multi": false,
          "name": "country",
          "tagValuesQuery": "",
          "tagsQuery": "",
          "query": "select sub.value from (select country_value as value, 0 as ord from tcountries where country_name = '[[country_name]]' union select 'all', 1 as ord) sub order by sub.ord limit 1",
          "skipUrlSync": true,
          "type": "query",
          "sort": 0,
          "tags": [],
          "current": {
            "text": "all",
            "value": "all"
          },
          "definition": "",
          "label": "",
          "options": [],
          "refresh": 1
        },
        {
          "tags": [],
          "hide": 0,
          "options": [],
          "regex": "",
          "skipUrlSync": false,
          "useTags": false,
          "current": {
            "text": "All",
            "value": "All"
          },
          "definition": "",
          "includeAll": false,
          "sort": 0,
          "tagsQuery": "",
          "allValue": "all",
          "label": "Country",
          "refresh": 1,
          "query": "select 'All' union select country_name from tcountries order by 1",
          "tagValuesQuery": "",
          "type": "query",
          "datasource": "psql",
          "multi": false,
          "name": "country_name"
        }
      ]
    },
    "time": {
      "from": "now-5y",
      "to": "now"
    },
    "timezone": "",
    "graphTooltip": 0,
    "refresh": false,
    "style": "dark",
    "uid": "9",
    "version": 2,
    "annotations": {
      "list": [
        {
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations \u0026 Alerts",
          "type": "dashboard",
          "builtIn": 1,
          "datasource": "-- Grafana --"
        }
      ]
    }
  }


slug: documentation-committers-in-repository-groups
title: Documentation Committers in Repository Groups
created: 2024-04-09 11:21:31.386483172+00:00
updated: 2024-04-09 11:21:31.386483252+00:00
uid: 61
data:
  {
    "graphTooltip": 0,
    "links": [],
    "schemaVersion": 20,
    "editable": true,
    "gnetId": null,
    "time": {
      "from": "now-3y",
      "to": "now"
    },
    "timepicker": {
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ]
    },
    "id": 12,
    "tags": [
      "companies",
      "dashboard",
      "cii"
    ],
    "panels": [
      {
        "stack": false,
        "timeFrom": null,
        "yaxes": [
          {
            "format": "none",
            "label": "Companies",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true
          },
          {
            "max": null,
            "min": "0",
            "show": true,
            "format": "none",
            "label": "Developers",
            "logBase": 1
          }
        ],
        "bars": false,
        "dashes": false,
        "nullPointMode": "null",
        "options": {
          "dataLinks": []
        },
        "seriesOverrides": [
          {
            "yaxis": 2,
            "alias": "Number of documentation committers"
          }
        ],
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "links": [],
        "points": false,
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": [
            "total"
          ]
        },
        "datasource": "psql",
        "decimals": 0,
        "description": "",
        "lines": true,
        "transparent": true,
        "aliasColors": {
          
        },
        "fill": 1,
        "legend": {
          "min": true,
          "total": false,
          "alignAsTable": true,
          "hideEmpty": false,
          "max": true,
          "rightSide": false,
          "show": true,
          "values": true,
          "avg": true,
          "current": true,
          "hideZero": false
        },
        "steppedLine": false,
        "title": "Documentation committers: companies and developers ([[repogroup_name]], [[period]])",
        "tooltip": {
          "value_type": "individual",
          "shared": true,
          "sort": 0
        },
        "type": "graph",
        "fillGradient": 0,
        "id": 1,
        "pointradius": 1,
        "targets": [
          {
            "alias": "Number of companies commiting to documentation",
            "query": "",
            "rawQuery": true,
            "groupBy": [],
            "orderByTime": "ASC",
            "resultFormat": "time_series",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "hide": false,
            "measurement": "reviewers_d",
            "policy": "autogen",
            "rawSql": "select\n  time,\n  value as \"Number of companies commiting to documentation\"\nfrom\n  sdoc_committers\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'docstats[[repogroup]]comps'\norder by\n  time",
            "refId": "A",
            "dsType": "influxdb",
            "tags": []
          },
          {
            "dsType": "influxdb",
            "groupBy": [],
            "policy": "autogen",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "tags": [],
            "orderByTime": "ASC",
            "query": "",
            "rawQuery": true,
            "rawSql": "select\n  time,\n  value as \"Number of documentation committers\"\nfrom\n  sdoc_committers\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'docstats[[repogroup]]devs'\norder by\n  time",
            "refId": "B",
            "alias": "Number of documentation committers",
            "hide": false,
            "measurement": "reviewers_d",
            "resultFormat": "time_series"
          }
        ],
        "thresholds": [],
        "timeRegions": [],
        "timeShift": null,
        "gridPos": {
          "h": 22,
          "w": 24,
          "x": 0,
          "y": 0
        },
        "percentage": false,
        "spaceLength": 10,
        "dashLength": 10,
        "linewidth": 1,
        "renderer": "flot"
      },
      {
        "content": "${docs:raw}",
        "mode": "html",
        "title": "Dashboard documentation",
        "type": "text",
        "datasource": null,
        "gridPos": {
          "h": 12,
          "w": 24,
          "x": 0,
          "y": 22
        },
        "id": 11,
        "links": [],
        "options": {
          
        }
      }
    ],
    "refresh": false,
    "uid": "61",
    "version": 2,
    "annotations": {
      "list": [
        {
          "builtIn": 1,
          "datasource": "-- Grafana --",
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations \u0026 Alerts",
          "type": "dashboard"
        },
        {
          "query": "SELECT title, description from annotations WHERE $timeFilter order by time asc",
          "rawQuery": "select extract(epoch from time) AS time, title as text, description as tags from sannotations where $__timeFilter(time)",
          "showIn": 0,
          "datasource": "psql",
          "hide": false,
          "name": "Releases",
          "tagsColumn": "title,description",
          "textColumn": "",
          "titleColumn": "[[full_name]] release",
          "type": "alert",
          "enable": true,
          "iconColor": "rgba(255, 96, 96, 1)",
          "limit": 100
        }
      ]
    },
    "iteration": 1571375114763,
    "timezone": "",
    "title": "Documentation Committers in Repository Groups",
    "style": "dark",
    "templating": {
      "list": [
        {
          "hide": 0,
          "includeAll": false,
          "label": "Period",
          "multi": false,
          "name": "period",
          "options": [
            {
              "selected": false,
              "text": "7 Days MA",
              "value": "d7"
            },
            {
              "text": "Week",
              "value": "w",
              "selected": false
            },
            {
              "selected": false,
              "text": "Month",
              "value": "m"
            },
            {
              "text": "Quarter",
              "value": "q",
              "selected": false
            }
          ],
          "allValue": null,
          "current": {
            "text": "7 Days MA",
            "value": "d7",
            "tags": []
          },
          "query": "d7,w,m,q",
          "skipUrlSync": false,
          "type": "custom"
        },
        {
          "allValue": null,
          "skipUrlSync": true,
          "tagValuesQuery": "",
          "tagsQuery": "",
          "current": {
            "text": "CII",
            "value": "CII"
          },
          "label": null,
          "sort": 0,
          "useTags": false,
          "tags": [],
          "definition": "",
          "hide": 2,
          "includeAll": false,
          "multi": false,
          "name": "full_name",
          "refresh": 1,
          "regex": "",
          "datasource": "psql",
          "options": [],
          "query": "select value_s from gha_vars where name = 'full_name'",
          "type": "query"
        },
        {
          "definition": "",
          "label": "Repository group",
          "name": "repogroup_name",
          "skipUrlSync": false,
          "query": "select all_repo_group_name from tall_repo_groups order by 1",
          "tags": [],
          "useTags": false,
          "type": "query",
          "current": {
            "value": "All",
            "tags": [],
            "text": "All"
          },
          "hide": 0,
          "options": [],
          "refresh": 1,
          "regex": "",
          "tagValuesQuery": "",
          "tagsQuery": "",
          "allValue": null,
          "datasource": "psql",
          "includeAll": false,
          "multi": false,
          "sort": 0
        },
        {
          "current": {
            "text": "all",
            "value": "all"
          },
          "hide": 2,
          "skipUrlSync": true,
          "tagValuesQuery": "",
          "multi": false,
          "name": "repogroup",
          "options": [],
          "refresh": 1,
          "useTags": false,
          "datasource": "psql",
          "includeAll": false,
          "label": "",
          "sort": 0,
          "tags": [],
          "tagsQuery": "",
          "allValue": null,
          "definition": "",
          "query": "select all_repo_group_value from tall_repo_groups where all_repo_group_name = '[[repogroup_name]]'",
          "regex": "",
          "type": "query"
        },
        {
          "definition": "",
          "query": "select value_s from gha_vars where name = 'documentation_committers_docs_html'",
          "skipUrlSync": true,
          "refresh": 1,
          "sort": 0,
          "type": "query",
          "allValue": null,
          "label": null,
          "multi": false,
          "options": [],
          "tags": [],
          "tagsQuery": "",
          "useTags": false,
          "current": {
            "text": "\u003ch1 id=\"dashboard-header\"\u003eCII documentation committers dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/doc_committers.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003edoc_committers\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/cii/documentation-committers-in-repository-groups.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows how many companies and developers are commiting documentation in a given repository group.\u003c/li\u003e\n\u003cli\u003eDocumentation commiter is someone who commited anything changing \u003ccode\u003e.md\u003c/code\u003e file(s).\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary for all of them.\u003c/li\u003e\n\u003cli\u003eSelecting period (for example week) means that dashboard will show data in those periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots activity, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003cli\u003eWe are determining user's company affiliation from \u003ca href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\"\u003ethis file\u003c/a\u003e, which is imported from \u003ccode\u003ecncf/gitdm\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e",
            "value": "\u003ch1 id=\"dashboard-header\"\u003eCII documentation committers dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/doc_committers.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003edoc_committers\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/cii/documentation-committers-in-repository-groups.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows how many companies and developers are commiting documentation in a given repository group.\u003c/li\u003e\n\u003cli\u003eDocumentation commiter is someone who commited anything changing \u003ccode\u003e.md\u003c/code\u003e file(s).\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary for all of them.\u003c/li\u003e\n\u003cli\u003eSelecting period (for example week) means that dashboard will show data in those periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003cli\u003eWe are skipping bots activity, see \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\"\u003eexcluding bots\u003c/a\u003e for details.\u003c/li\u003e\n\u003cli\u003eWe are determining user's company affiliation from \u003ca href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\"\u003ethis file\u003c/a\u003e, which is imported from \u003ccode\u003ecncf/gitdm\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e"
          },
          "datasource": "psql",
          "hide": 2,
          "includeAll": false,
          "name": "docs",
          "regex": "",
          "tagValuesQuery": ""
        }
      ]
    }
  }


slug: github-events
title: GitHub Events
created: 2024-04-09 11:21:31.392696708+00:00
updated: 2024-04-09 11:21:31.392696788+00:00
uid: 47
data:
  {
    "refresh": false,
    "tags": [
      "dashboard",
      "cii"
    ],
    "version": 3,
    "gnetId": null,
    "panels": [
      {
        "aliasColors": {
          
        },
        "description": "[[full_name]] GitHub events",
        "links": [],
        "spaceLength": 10,
        "targets": [
          {
            "query": "SELECT /^[[repogroups]]$/ FROM \"repo_group_activity_[[period]]\" WHERE $timeFilter",
            "dsType": "influxdb",
            "orderByTime": "ASC",
            "refId": "A",
            "tags": [],
            "groupBy": [],
            "measurement": "notused",
            "resultFormat": "time_series",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "alias": "",
            "policy": "default",
            "rawQuery": true,
            "rawSql": "select\n  time,\n  ${types:csv}\nfrom\n  sevent_types\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "format": "time_series"
          }
        ],
        "thresholds": [],
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "dashLength": 10,
        "gridPos": {
          "y": 0,
          "h": 21,
          "w": 24,
          "x": 0
        },
        "lines": false,
        "linewidth": 0,
        "pointradius": 5,
        "steppedLine": true,
        "tooltip": {
          "shared": true,
          "sort": 2,
          "value_type": "individual"
        },
        "fill": 3,
        "decimals": null,
        "renderer": "flot",
        "stack": true,
        "type": "graph",
        "datasource": "psql",
        "percentage": false,
        "seriesOverrides": [],
        "points": false,
        "timeShift": null,
        "title": "[[full_name]] GitHub events ([[types]], [[period]])",
        "xaxis": {
          "name": null,
          "show": true,
          "values": [],
          "buckets": null,
          "mode": "time"
        },
        "dashes": false,
        "legend": {
          "current": true,
          "values": true,
          "sort": "total",
          "sortDesc": true,
          "alignAsTable": true,
          "avg": true,
          "max": true,
          "min": true,
          "rightSide": true,
          "show": true,
          "total": true
        },
        "bars": true,
        "id": 2,
        "nullPointMode": "null as zero",
        "timeFrom": null,
        "yaxes": [
          {
            "label": "GitHub Events",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true,
            "decimals": null,
            "format": "short"
          },
          {
            "format": "short",
            "label": "",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true
          }
        ]
      },
      {
        "thresholds": [],
        "id": 4,
        "timeShift": null,
        "renderer": "flot",
        "stack": false,
        "bars": false,
        "decimals": null,
        "description": "[[full_name]] GitHub events",
        "fill": 3,
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "datasource": "psql",
        "linewidth": 1,
        "links": [],
        "percentage": false,
        "aliasColors": {
          
        },
        "steppedLine": false,
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": []
        },
        "lines": true,
        "tooltip": {
          "shared": true,
          "sort": 2,
          "value_type": "individual"
        },
        "seriesOverrides": [],
        "spaceLength": 10,
        "timeFrom": null,
        "dashLength": 10,
        "gridPos": {
          "h": 21,
          "w": 24,
          "x": 0,
          "y": 21
        },
        "legend": {
          "total": true,
          "values": true,
          "alignAsTable": true,
          "avg": true,
          "current": true,
          "max": true,
          "rightSide": true,
          "min": true,
          "show": true,
          "sort": "total",
          "sortDesc": true
        },
        "points": false,
        "title": "[[full_name]] GitHub events ([[types]], [[period]])",
        "type": "graph",
        "yaxes": [
          {
            "show": true,
            "decimals": null,
            "format": "short",
            "label": "GitHub Events",
            "logBase": 1,
            "max": null,
            "min": "0"
          },
          {
            "max": null,
            "min": "0",
            "show": false,
            "format": "short",
            "label": "",
            "logBase": 1
          }
        ],
        "dashes": false,
        "nullPointMode": "null as zero",
        "pointradius": 5,
        "targets": [
          {
            "refId": "A",
            "resultFormat": "time_series",
            "measurement": "notused",
            "orderByTime": "ASC",
            "query": "SELECT /^[[repogroups]]$/ FROM \"repo_group_activity_[[period]]\" WHERE $timeFilter",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "tags": [],
            "alias": "",
            "format": "time_series",
            "rawQuery": true,
            "rawSql": "select\n  time,\n  ${types:csv}\nfrom\n  sevent_types\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "dsType": "influxdb",
            "groupBy": [],
            "policy": "default"
          }
        ]
      },
      {
        "linewidth": 0,
        "yaxes": [
          {
            "format": "short",
            "label": "GitHub Events",
            "logBase": 1,
            "max": "100",
            "min": "0",
            "show": true,
            "decimals": null
          },
          {
            "max": null,
            "min": "0",
            "show": true,
            "format": "short",
            "label": "",
            "logBase": 1
          }
        ],
        "aliasColors": {
          
        },
        "dashLength": 10,
        "decimals": null,
        "description": "[[full_name]] GitHub events",
        "lines": false,
        "datasource": "psql",
        "fill": 3,
        "stack": true,
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": []
        },
        "seriesOverrides": [],
        "spaceLength": 10,
        "steppedLine": true,
        "targets": [
          {
            "format": "time_series",
            "policy": "default",
            "refId": "A",
            "groupBy": [],
            "query": "SELECT /^[[repogroups]]$/ FROM \"repo_group_activity_[[period]]\" WHERE $timeFilter",
            "rawQuery": true,
            "rawSql": "select\n  time,\n  ${types:csv}\nfrom\n  sevent_types\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "resultFormat": "time_series",
            "alias": "",
            "orderByTime": "ASC",
            "dsType": "influxdb",
            "measurement": "notused",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "tags": []
          }
        ],
        "tooltip": {
          "sort": 2,
          "value_type": "individual",
          "shared": true
        },
        "type": "graph",
        "bars": true,
        "gridPos": {
          "h": 21,
          "w": 24,
          "x": 0,
          "y": 42
        },
        "legend": {
          "sort": "total",
          "sortDesc": true,
          "total": true,
          "values": true,
          "avg": true,
          "min": true,
          "rightSide": true,
          "show": true,
          "alignAsTable": true,
          "current": true,
          "max": true
        },
        "links": [],
        "nullPointMode": "null as zero",
        "dashes": false,
        "id": 3,
        "percentage": true,
        "renderer": "flot",
        "timeShift": null,
        "points": false,
        "title": "[[full_name]] GitHub events ([[types]], [[period]])",
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "timeFrom": null,
        "pointradius": 5,
        "thresholds": []
      },
      {
        "content": "${docs:raw}",
        "gridPos": {
          "h": 10,
          "w": 24,
          "x": 0,
          "y": 63
        },
        "id": 1,
        "links": [],
        "mode": "html",
        "title": "Dashboard documentation",
        "type": "text"
      }
    ],
    "id": 63,
    "uid": "47",
    "iteration": 1533024842622,
    "links": [],
    "templating": {
      "list": [
        {
          "skipUrlSync": true,
          "allValue": null,
          "current": {
            
          },
          "multi": false,
          "name": "full_name",
          "includeAll": false,
          "label": null,
          "query": "select value_s from gha_vars where name = 'full_name'",
          "tagsQuery": "",
          "tagValuesQuery": "",
          "tags": [],
          "type": "query",
          "useTags": false,
          "hide": 2,
          "options": [],
          "regex": "",
          "sort": 0,
          "datasource": "psql",
          "refresh": 1
        },
        {
          "includeAll": false,
          "name": "period",
          "current": {
            "tags": [],
            "text": "24 Hours MA",
            "value": "h24"
          },
          "hide": 0,
          "label": "Period",
          "multi": false,
          "options": [
            {
              "value": "h",
              "selected": false,
              "text": "Hour"
            },
            {
              "selected": true,
              "text": "24 Hours MA",
              "value": "h24"
            },
            {
              "selected": false,
              "text": "Day",
              "value": "d"
            },
            {
              "selected": false,
              "text": "7 Days MA",
              "value": "d7"
            },
            {
              "selected": false,
              "text": "Week",
              "value": "w"
            },
            {
              "selected": false,
              "text": "Month",
              "value": "m"
            },
            {
              "selected": false,
              "text": "Quarter",
              "value": "q"
            },
            {
              "value": "y",
              "selected": false,
              "text": "Year"
            }
          ],
          "query": "h,d,w,m,q,y",
          "skipUrlSync": false,
          "type": "custom",
          "allValue": null
        },
        {
          "tagValuesQuery": "",
          "useTags": false,
          "allValue": "",
          "datasource": "psql",
          "includeAll": true,
          "options": [],
          "skipUrlSync": false,
          "label": "Event type",
          "name": "types",
          "query": "select '\"' || event_type_name || '\"' from tevent_types order by 1",
          "tags": [],
          "tagsQuery": "",
          "type": "query",
          "current": {
            "text": "All",
            "value": "$__all"
          },
          "hide": 0,
          "refresh": 1,
          "regex": "",
          "sort": 0,
          "multi": true
        },
        {
          "options": [],
          "allValue": null,
          "hide": 2,
          "multi": false,
          "query": "select value_s from gha_vars where name = 'github_events_docs_html'",
          "regex": "",
          "useTags": false,
          "datasource": "psql",
          "includeAll": false,
          "skipUrlSync": true,
          "sort": 0,
          "tagValuesQuery": "",
          "label": null,
          "refresh": 1,
          "tags": [],
          "tagsQuery": "",
          "type": "query",
          "current": {
            
          },
          "name": "docs"
        }
      ]
    },
    "time": {
      "from": "now-30d",
      "to": "now"
    },
    "timezone": "",
    "title": "GitHub Events",
    "annotations": {
      "list": [
        {
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations \u0026 Alerts",
          "type": "dashboard",
          "builtIn": 1,
          "datasource": "-- Grafana --",
          "enable": true,
          "hide": true
        },
        {
          "enable": true,
          "hide": false,
          "limit": 100,
          "tagsColumn": "title,description",
          "titleColumn": "[[full_name]] Release",
          "datasource": "psql",
          "iconColor": "rgba(255, 96, 96, 1)",
          "name": "Releases",
          "query": "SELECT title, description from annotations WHERE $timeFilter order by time asc",
          "rawQuery": "select extract(epoch from time) AS time, title as text, description as tags from sannotations where $__timeFilter(time)",
          "showIn": 0,
          "textColumn": "",
          "type": "alert"
        }
      ]
    },
    "editable": true,
    "style": "dark",
    "timepicker": {
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ]
    },
    "graphTooltip": 0,
    "schemaVersion": 16
  }


slug: home
title: Home
created: 2024-04-09 11:21:31.400669269+00:00
updated: 2024-04-09 11:21:31.400669359+00:00
uid: 62
data:
  {
    "description": "Replicate git analytics data",
    "schemaVersion": 18,
    "style": "dark",
    "templating": {
      "list": [
        {
          "name": "repogroups",
          "options": [],
          "regex": "",
          "tagsQuery": "",
          "allValue": null,
          "datasource": "psql",
          "type": "query",
          "query": "select distinct repo_group from gha_repos where repo_group is not null order by 1",
          "skipUrlSync": false,
          "sort": 0,
          "current": {
            "tags": [],
            "text": "All",
            "value": [
              "$__all"
            ]
          },
          "definition": "select distinct repo_group from gha_repos where repo_group is not null order by 1",
          "hide": 0,
          "includeAll": true,
          "label": "Repository groups",
          "tagValuesQuery": "",
          "tags": [],
          "useTags": false,
          "multi": true,
          "refresh": 1
        },
        {
          "datasource": "psql",
          "regex": "",
          "skipUrlSync": false,
          "sort": 0,
          "tags": [],
          "current": {
            "tags": [],
            "text": "All",
            "value": [
              "$__all"
            ]
          },
          "includeAll": true,
          "label": "Contributors",
          "name": "contributors",
          "refresh": 1,
          "tagValuesQuery": "",
          "tagsQuery": "",
          "allValue": "null",
          "hide": 0,
          "multi": true,
          "type": "query",
          "useTags": false,
          "definition": "select sub.actor from (select e.dup_actor_login as actor, count(distinct e.id) as cnt from gha_events e, gha_repos r where $__timeFilter(e.created_at) and e.repo_id = r.id and e.dup_repo_name = r.name and r.repo_group in ($repogroups) and lower(dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%']) group by e.dup_actor_login order by cnt desc limit 200) sub",
          "options": [],
          "query": "select sub.actor from (select e.dup_actor_login as actor, count(distinct e.id) as cnt from gha_events e, gha_repos r where $__timeFilter(e.created_at) and e.repo_id = r.id and e.dup_repo_name = r.name and r.repo_group in ($repogroups) and lower(dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%']) group by e.dup_actor_login order by cnt desc limit 200) sub"
        }
      ]
    },
    "time": {
      "from": "now-1M",
      "to": "now"
    },
    "version": 4,
    "timezone": "",
    "title": "Home",
    "annotations": {
      "list": [
        {
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations \u0026 Alerts",
          "type": "dashboard",
          "builtIn": 1,
          "datasource": "-- Grafana --",
          "enable": true
        }
      ]
    },
    "graphTooltip": 2,
    "id": 14,
    "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"
      ]
    },
    "uid": "62",
    "editable": true,
    "gnetId": null,
    "iteration": 1561540804599,
    "links": [],
    "panels": [
      {
        "cacheTimeout": null,
        "mappingType": 1,
        "rangeMaps": [
          {
            "from": "null",
            "text": "N/A",
            "to": "null"
          }
        ],
        "mappingTypes": [
          {
            "name": "value to text",
            "value": 1
          },
          {
            "name": "range to text",
            "value": 2
          }
        ],
        "prefix": "Last event:",
        "type": "singlestat",
        "valueMaps": [],
        "nullPointMode": "connected",
        "timeShift": null,
        "description": "Time of the last event.",
        "gauge": {
          "maxValue": 100,
          "minValue": 0,
          "show": false,
          "thresholdLabels": false,
          "thresholdMarkers": true
        },
        "links": [],
        "postfix": "",
        "tableColumn": "",
        "valueName": "last_time",
        "targets": [
          {
            "format": "time_series",
            "group": [],
            "refId": "A",
            "table": "sall_prs_merged",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "metricColumn": "none",
            "rawQuery": true,
            "rawSql": "select\n  max(e.created_at) as \"time\",\n  0 as value\nfrom\n  gha_events e,\n  gha_repos r\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(e.created_at)\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(e.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "timeColumn": "\"time\"",
            "timeColumnType": "timestamp"
          }
        ],
        "valueFontSize": "50%",
        "colorBackground": false,
        "colorValue": false,
        "colors": [
          "#299c46",
          "rgba(237, 129, 40, 0.89)",
          "#d44a3a"
        ],
        "id": 4,
        "options": {
          
        },
        "sparkline": {
          "fillColor": "rgba(31, 118, 189, 0.18)",
          "full": false,
          "lineColor": "rgb(31, 120, 193)",
          "show": false
        },
        "format": "dateTimeAsUS",
        "timeFrom": null,
        "title": "",
        "transparent": true,
        "decimals": null,
        "gridPos": {
          "h": 1,
          "w": 4,
          "x": 0,
          "y": 0
        },
        "maxDataPoints": 100,
        "interval": "1h",
        "nullText": null,
        "postfixFontSize": "50%",
        "prefixFontSize": "30%",
        "thresholds": ""
      },
      {
        "colorBackground": false,
        "format": "none",
        "links": [],
        "prefixFontSize": "30%",
        "targets": [
          {
            "rawSql": "select\n  sub.time as \"time\",\n  ((sub.current - sub.previous) * 100.0) / (case sub.previous when 0 then 1 else sub.previous end) as \"value\"\nfrom (\n  select\n    max(c.dup_created_at) as \"time\",\n    count(distinct c.sha) filter (where c.dup_created_at \u003e= now() - '2 months'::interval and c.dup_created_at \u003c now() - '1 month'::interval) as \"previous\",\n    count(distinct c.sha) filter (where $__timeFilter(c.dup_created_at)) as \"current\"\n  from\n    gha_commits c,\n    gha_repos r\n  where\n    c.dup_repo_id = r.id\n    and c.dup_repo_name = r.name\n    and r.repo_group in ([[repogroups]])\n    and (c.dup_author_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n    and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\n) sub",
            "table": "sall_prs_merged",
            "format": "time_series",
            "metricColumn": "none",
            "rawQuery": true,
            "timeColumn": "\"time\"",
            "timeColumnType": "timestamp",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "group": [],
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ]
          }
        ],
        "colors": [
          "#C4162A",
          "#FFF899",
          "#56A64B"
        ],
        "mappingType": 1,
        "postfixFontSize": "30%",
        "prefix": "Commits change",
        "cacheTimeout": null,
        "colorPrefix": true,
        "gauge": {
          "maxValue": 100,
          "minValue": 0,
          "show": false,
          "thresholdLabels": false,
          "thresholdMarkers": true
        },
        "nullPointMode": "connected",
        "tableColumn": "",
        "valueName": "current",
        "mappingTypes": [
          {
            "name": "value to text",
            "value": 1
          },
          {
            "name": "range to text",
            "value": 2
          }
        ],
        "timeShift": null,
        "decimals": 1,
        "nullText": null,
        "type": "singlestat",
        "valueMaps": [],
        "colorValue": true,
        "interval": "1h",
        "maxDataPoints": 100,
        "timeFrom": null,
        "title": "",
        "transparent": true,
        "valueFontSize": "50%",
        "colorPostfix": true,
        "options": {
          
        },
        "rangeMaps": [
          {
            "from": "null",
            "text": "N/A",
            "to": "null"
          }
        ],
        "thresholds": "-20,20",
        "description": "The number of commits for the last month compared to the previous month.",
        "gridPos": {
          "h": 1,
          "w": 5,
          "x": 4,
          "y": 0
        },
        "id": 5,
        "postfix": "%",
        "sparkline": {
          "fillColor": "rgba(31, 118, 189, 0.18)",
          "full": false,
          "lineColor": "rgb(31, 120, 193)",
          "show": false
        }
      },
      {
        "mapCenterLongitude": 0,
        "unitSingular": "contribution",
        "decimals": 0,
        "initialZoom": 1,
        "tableQueryOptions": {
          "queryType": "geohash",
          "geohashField": "country",
          "labelField": "country",
          "latitudeField": "latitude",
          "longitudeField": "longitude",
          "metricField": "value"
        },
        "timeShift": null,
        "unitPlural": "contributions",
        "locationData": "countries",
        "maxDataPoints": 1,
        "timeFrom": null,
        "title": "Last month contributions",
        "unitSingle": "",
        "circleMaxSize": "20",
        "esMetric": "Count",
        "mouseWheelZoom": true,
        "showLegend": false,
        "valueName": "current",
        "stickyLabels": false,
        "thresholds": "5,50,500",
        "gridPos": {
          "h": 8,
          "w": 7,
          "x": 9,
          "y": 0
        },
        "id": 7,
        "interval": "1h",
        "mapCenter": "custom",
        "options": {
          
        },
        "targets": [
          {
            "group": [],
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "where": [
              {
                "params": [],
                "type": "macro",
                "name": "$__timeFilter"
              }
            ],
            "timeColumnType": "timestamp",
            "format": "time_series",
            "metricColumn": "none",
            "rawQuery": true,
            "rawSql": "select\n  now() as \"time\",\n  count(e.id) as \"value\",\n  coalesce(a.country_id, '') as \"name\"\nfrom\n  gha_actors a,\n  gha_events e,\n  gha_repos r\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and e.dup_actor_login = a.login\n  and e.type in ('IssuesEvent', 'PullRequestEvent', 'PushEvent', 'PullRequestReviewCommentEvent', 'IssueCommentEvent', 'CommitCommentEvent')\n  and $__timeFilter(e.created_at)\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(a.login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  a.country_id",
            "refId": "A",
            "table": "sall_prs_merged",
            "timeColumn": "\"time\""
          }
        ],
        "transparent": true,
        "circleMinSize": "2",
        "colors": [
          "rgba(245, 54, 54, 0.9)",
          "rgba(237, 129, 40, 0.89)",
          "#FFEE52",
          "rgba(50, 172, 45, 0.97)"
        ],
        "hideEmpty": false,
        "type": "grafana-worldmap-panel",
        "hideZero": false,
        "links": [],
        "mapCenterLatitude": "30"
      },
      {
        "links": [],
        "mouseWheelZoom": true,
        "transparent": true,
        "type": "grafana-worldmap-panel",
        "circleMaxSize": "20",
        "description": "Number of active contributors during the last month.",
        "gridPos": {
          "h": 8,
          "w": 7,
          "x": 16,
          "y": 0
        },
        "id": 9,
        "targets": [
          {
            "refId": "A",
            "select": [
              [
                {
                  "type": "column",
                  "params": [
                    "value"
                  ]
                }
              ]
            ],
            "table": "sall_prs_merged",
            "timeColumn": "\"time\"",
            "format": "time_series",
            "metricColumn": "none",
            "rawQuery": true,
            "rawSql": "select\n  now() as \"time\",\n  count(distinct a.login) as \"value\",\n  coalesce(a.country_id, '') as \"name\"\nfrom\n  gha_actors a,\n  gha_events e,\n  gha_repos r\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and e.dup_actor_login = a.login\n  and e.type in ('IssuesEvent', 'PullRequestEvent', 'PushEvent', 'PullRequestReviewCommentEvent', 'IssueCommentEvent', 'CommitCommentEvent')\n  and $__timeFilter(e.created_at)\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(a.login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  a.country_id",
            "timeColumnType": "timestamp",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "group": []
          }
        ],
        "title": "Last month contributors",
        "circleMinSize": 2,
        "hideZero": false,
        "mapCenterLatitude": "30",
        "timeShift": null,
        "valueName": "current",
        "colors": [
          "rgba(245, 54, 54, 0.9)",
          "rgba(237, 129, 40, 0.89)",
          "#FFEE52",
          "rgba(50, 172, 45, 0.97)"
        ],
        "showLegend": false,
        "locationData": "countries",
        "tableQueryOptions": {
          "metricField": "value",
          "queryType": "geohash",
          "geohashField": "country",
          "labelField": "country",
          "latitudeField": "latitude",
          "longitudeField": "longitude"
        },
        "mapCenter": "custom",
        "mapCenterLongitude": 0,
        "stickyLabels": false,
        "unitPlural": "contributors",
        "unitSingular": "contributor",
        "esMetric": "Count",
        "initialZoom": 1,
        "maxDataPoints": 1,
        "options": {
          
        },
        "unitSingle": "",
        "decimals": 0,
        "thresholds": "2,5,10",
        "timeFrom": null,
        "hideEmpty": false
      },
      {
        "id": 2,
        "title": "Percent repositories active",
        "transparent": true,
        "type": "gauge",
        "description": "Percent of repositories active during the last month compared to the number of repositories active during the last year.",
        "gridPos": {
          "h": 7,
          "w": 4,
          "x": 0,
          "y": 1
        },
        "interval": "1h",
        "links": [],
        "options": {
          "showThresholdMarkers": true,
          "fieldOptions": {
            "calcs": [
              "last"
            ],
            "defaults": {
              "title": "Last month vs last year",
              "decimals": 1,
              "max": 100,
              "min": 0
            },
            "mappings": [],
            "override": {
              
            },
            "thresholds": [
              {
                "color": "dark-red",
                "index": 0,
                "value": null
              },
              {
                "value": 30,
                "color": "light-yellow",
                "index": 1
              },
              {
                "color": "dark-green",
                "index": 2,
                "value": 70
              }
            ],
            "values": false
          },
          "orientation": "auto",
          "showThresholdLabels": true
        },
        "pluginVersion": "6.2.4",
        "targets": [
          {
            "where": [
              {
                "type": "macro",
                "name": "$__timeFilter",
                "params": []
              }
            ],
            "format": "time_series",
            "group": [],
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "timeColumnType": "timestamp",
            "metricColumn": "none",
            "rawQuery": true,
            "rawSql": "select\n  sub.time,\n  (sub.recent * 100.0) / (case sub.all when 0 then 1 else sub.all end)\nfrom (\n  select\n    max(e.created_at) as time,\n    count(distinct e.repo_id) filter (where e.created_at \u003e= now() - '1 year'::interval) as all,\n    count(distinct e.repo_id) filter (where $__timeFilter(e.created_at)) as recent\n  from\n    gha_events e,\n    gha_repos r\n  where\n    e.repo_id = r.id\n    and e.dup_repo_name = r.name\n    and r.repo_group in ([[repogroups]])\n    and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n) sub",
            "table": "sall_prs_merged",
            "timeColumn": "\"time\""
          }
        ],
        "timeFrom": null,
        "timeShift": null
      },
      {
        "type": "singlestat",
        "valueFontSize": "50%",
        "valueName": "current",
        "description": "Percent of PRs opened during the last month compared to the number of PRs opened during the previous month.",
        "id": 10,
        "prefix": "Opened PRs change",
        "sparkline": {
          "fillColor": "rgba(31, 118, 189, 0.18)",
          "full": false,
          "lineColor": "rgb(31, 120, 193)",
          "show": false
        },
        "colorValue": true,
        "decimals": 1,
        "gauge": {
          "minValue": 0,
          "show": false,
          "thresholdLabels": false,
          "thresholdMarkers": true,
          "maxValue": 100
        },
        "rangeMaps": [
          {
            "text": "N/A",
            "to": "null",
            "from": "null"
          }
        ],
        "nullPointMode": "connected",
        "targets": [
          {
            "rawSql": "select\n  sub.time,\n  ((sub.current - sub.previous) * 100.0) / (case sub.previous when 0 then 1 else sub.previous end) as \"value\"\nfrom (\n  select\n    max(pr.created_at) as time,\n    count(distinct pr.id) filter (where pr.created_at \u003e= now() - '2 months'::interval and pr.created_at \u003c now() - '1 month'::interval) as previous,\n    count(distinct pr.id) filter (where $__timeFilter(pr.created_at)) as \"current\"\n  from\n    gha_pull_requests pr,\n    gha_repos r\n  where\n    pr.dup_repo_id = r.id\n    and pr.dup_repo_name = r.name\n    and r.repo_group in ([[repogroups]])\n    and (pr.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n) sub",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "timeColumn": "\"time\"",
            "where": [
              {
                "params": [],
                "type": "macro",
                "name": "$__timeFilter"
              }
            ],
            "format": "time_series",
            "group": [],
            "metricColumn": "none",
            "rawQuery": true,
            "refId": "A",
            "table": "sall_prs_merged",
            "timeColumnType": "timestamp"
          }
        ],
        "title": "",
        "thresholds": "-20,20",
        "timeShift": null,
        "colors": [
          "#C4162A",
          "#FFEE52",
          "#37872D"
        ],
        "mappingTypes": [
          {
            "name": "value to text",
            "value": 1
          },
          {
            "name": "range to text",
            "value": 2
          }
        ],
        "maxDataPoints": 100,
        "options": {
          
        },
        "nullText": null,
        "pluginVersion": "6.2.4",
        "postfix": "%",
        "tableColumn": "",
        "cacheTimeout": null,
        "colorBackground": false,
        "links": [],
        "mappingType": 1,
        "colorPrefix": true,
        "interval": "1h",
        "gridPos": {
          "h": 1,
          "w": 5,
          "x": 4,
          "y": 1
        },
        "postfixFontSize": "30%",
        "transparent": true,
        "valueMaps": [],
        "colorPostfix": true,
        "format": "none",
        "prefixFontSize": "30%",
        "timeFrom": null
      },
      {
        "colorPostfix": true,
        "decimals": 1,
        "gridPos": {
          "h": 1,
          "w": 5,
          "x": 4,
          "y": 2
        },
        "nullText": null,
        "timeFrom": null,
        "title": "",
        "cacheTimeout": null,
        "postfixFontSize": "30%",
        "prefixFontSize": "30%",
        "valueMaps": [],
        "postfix": "%",
        "interval": "1h",
        "mappingType": 1,
        "maxDataPoints": 100,
        "type": "singlestat",
        "valueName": "current",
        "colorValue": true,
        "colors": [
          "#C4162A",
          "#FFF899",
          "#56A64B"
        ],
        "description": "Percent of PRs merged during the last month compared to the number of PRs merged during the previous month.",
        "colorPrefix": true,
        "gauge": {
          "maxValue": 100,
          "minValue": 0,
          "show": false,
          "thresholdLabels": false,
          "thresholdMarkers": true
        },
        "id": 11,
        "links": [],
        "mappingTypes": [
          {
            "name": "value to text",
            "value": 1
          },
          {
            "name": "range to text",
            "value": 2
          }
        ],
        "nullPointMode": "connected",
        "rangeMaps": [
          {
            "from": "null",
            "text": "N/A",
            "to": "null"
          }
        ],
        "colorBackground": false,
        "thresholds": "-20,20",
        "transparent": true,
        "options": {
          
        },
        "prefix": "Merged PRs change",
        "sparkline": {
          "fillColor": "rgba(31, 118, 189, 0.18)",
          "full": false,
          "lineColor": "rgb(31, 120, 193)",
          "show": false
        },
        "tableColumn": "",
        "targets": [
          {
            "table": "sall_prs_merged",
            "timeColumn": "\"time\"",
            "timeColumnType": "timestamp",
            "where": [
              {
                "params": [],
                "type": "macro",
                "name": "$__timeFilter"
              }
            ],
            "format": "time_series",
            "rawQuery": true,
            "rawSql": "select\n  sub.time,\n  ((sub.current - sub.previous) * 100.0) / (case sub.previous when 0 then 1 else sub.previous end) as \"value\"\nfrom (\n  select\n    max(pr.created_at) as time,\n    count(distinct pr.id) filter (where pr.merged_at \u003e= now() - '2 months'::interval and pr.merged_at \u003c now() - '1 month'::interval) as previous,\n    count(distinct pr.id) filter (where $__timeFilter(pr.merged_at)) as \"current\"\n  from\n    gha_pull_requests pr,\n    gha_repos r\n  where\n    pr.dup_repo_id = r.id\n    and pr.dup_repo_name = r.name\n    and r.repo_group in ([[repogroups]])\n    and (pr.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n) sub",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "group": [],
            "metricColumn": "none",
            "refId": "A"
          }
        ],
        "timeShift": null,
        "valueFontSize": "50%",
        "format": "none"
      },
      {
        "colorBackground": false,
        "colorPostfix": false,
        "valueMaps": [],
        "title": "",
        "transparent": true,
        "nullPointMode": "connected",
        "prefixFontSize": "30%",
        "tableColumn": "value",
        "timeShift": null,
        "interval": "1h",
        "postfix": "",
        "postfixFontSize": "30%",
        "decimals": null,
        "gauge": {
          "maxValue": 100,
          "minValue": 0,
          "show": false,
          "thresholdLabels": false,
          "thresholdMarkers": true
        },
        "type": "singlestat",
        "valueFontSize": "50%",
        "cacheTimeout": null,
        "colorValue": false,
        "options": {
          
        },
        "thresholds": "-20,20",
        "targets": [
          {
            "timeColumn": "\"time\"",
            "where": [
              {
                "params": [],
                "type": "macro",
                "name": "$__timeFilter"
              }
            ],
            "metricColumn": "none",
            "rawSql": "select\n  percentile_disc(0.5) within group (order by sub.time_to_merge asc) as \"value\"\nfrom (\n  select distinct\n    pr.id,\n    max(pr.merged_at) - max(pr.created_at) as time_to_merge\n  from\n    gha_pull_requests pr,\n    gha_repos r\n  where\n    pr.dup_repo_id = r.id\n    and pr.dup_repo_name = r.name\n    and r.repo_group in ([[repogroups]])\n    and pr.merged_at is not null\n    and pr.dup_type = 'PullRequestEvent'\n    and $__timeFilter(pr.merged_at)\n    and (pr.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  group by\n    pr.id\n) sub",
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "table": "sall_prs_merged",
            "timeColumnType": "timestamp",
            "format": "table",
            "group": [],
            "rawQuery": true
          }
        ],
        "timeFrom": null,
        "valueName": "current",
        "colors": [
          "#C4162A",
          "#FFF899",
          "#56A64B"
        ],
        "format": "none",
        "links": [],
        "rangeMaps": [
          {
            "from": "null",
            "text": "N/A",
            "to": "null"
          }
        ],
        "colorPrefix": false,
        "gridPos": {
          "y": 3,
          "h": 1,
          "w": 5,
          "x": 4
        },
        "id": 12,
        "mappingTypes": [
          {
            "name": "value to text",
            "value": 1
          },
          {
            "name": "range to text",
            "value": 2
          }
        ],
        "prefix": "Median time to merge PR",
        "sparkline": {
          "fillColor": "rgba(31, 118, 189, 0.18)",
          "full": false,
          "lineColor": "rgb(31, 120, 193)",
          "show": false
        },
        "description": "Median time to merge PRs during the last month.",
        "mappingType": 1,
        "maxDataPoints": 100,
        "nullText": null
      },
      {
        "gauge": {
          "maxValue": 100,
          "minValue": 0,
          "show": false,
          "thresholdLabels": false,
          "thresholdMarkers": true
        },
        "id": 14,
        "mappingType": 1,
        "tableColumn": "value",
        "targets": [
          {
            "timeColumn": "\"time\"",
            "timeColumnType": "timestamp",
            "format": "table",
            "group": [],
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "table": "sall_prs_merged",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "metricColumn": "none",
            "rawQuery": true,
            "rawSql": "select\n  percentile_disc(0.5) within group (order by sub.time_to_merge asc) as \"value\"\nfrom (\n  select distinct\n    pr.id,\n    max(pr.merged_at) - max(pr.created_at) as time_to_merge\n  from\n    gha_pull_requests pr,\n    gha_repos r\n  where\n    pr.dup_repo_id = r.id\n    and pr.dup_repo_name = r.name\n    and r.repo_group in ([[repogroups]])\n    and pr.merged_at is not null\n    and pr.dup_type = 'PullRequestEvent'\n    and pr.merged_at \u003e= now() - '2 months'::interval\n    and pr.merged_at \u003c now() - '1 month'::interval\n    and (pr.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  group by\n    pr.id\n) sub"
          }
        ],
        "colorBackground": false,
        "prefix": "Previous time to merge PR",
        "postfix": "",
        "postfixFontSize": "30%",
        "timeFrom": null,
        "colorValue": false,
        "decimals": null,
        "description": "Median time to merge PRs during the previous month.",
        "format": "none",
        "gridPos": {
          "y": 4,
          "h": 1,
          "w": 5,
          "x": 4
        },
        "valueName": "current",
        "colorPostfix": false,
        "options": {
          
        },
        "sparkline": {
          "fillColor": "rgba(31, 118, 189, 0.18)",
          "full": false,
          "lineColor": "rgb(31, 120, 193)",
          "show": false
        },
        "transparent": true,
        "nullText": null,
        "thresholds": "-20,20",
        "valueFontSize": "50%",
        "title": "",
        "cacheTimeout": null,
        "interval": "1h",
        "links": [],
        "prefixFontSize": "30%",
        "rangeMaps": [
          {
            "from": "null",
            "text": "N/A",
            "to": "null"
          }
        ],
        "colors": [
          "#C4162A",
          "#FFF899",
          "#56A64B"
        ],
        "mappingTypes": [
          {
            "name": "value to text",
            "value": 1
          },
          {
            "name": "range to text",
            "value": 2
          }
        ],
        "timeShift": null,
        "type": "singlestat",
        "valueMaps": [],
        "colorPrefix": false,
        "maxDataPoints": 100,
        "nullPointMode": "connected"
      },
      {
        "prefixFontSize": "30%",
        "rangeMaps": [
          {
            "from": "null",
            "text": "N/A",
            "to": "null"
          }
        ],
        "targets": [
          {
            "where": [
              {
                "params": [],
                "type": "macro",
                "name": "$__timeFilter"
              }
            ],
            "format": "table",
            "timeColumn": "\"time\"",
            "rawQuery": true,
            "rawSql": "with curr as (\n  select\n    extract(epoch from percentile_disc(0.5) within group (order by sub.time_to_merge asc)) as \"value\"\n  from (\n    select distinct\n      pr.id,\n      max(pr.merged_at) - max(pr.created_at) as time_to_merge\n    from\n      gha_pull_requests pr,\n      gha_repos r\n    where\n      pr.dup_repo_id = r.id\n      and pr.dup_repo_name = r.name\n      and r.repo_group in ([[repogroups]])\n      and pr.merged_at is not null\n      and pr.dup_type = 'PullRequestEvent'\n      and $__timeFilter(pr.merged_at)\n      and (pr.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n    group by\n      pr.id\n  ) sub\n), prev as (\n  select\n    extract(epoch from percentile_disc(0.5) within group (order by sub.time_to_merge asc)) as \"value\"\n  from (\n    select distinct\n      pr.id,\n      max(pr.merged_at) - max(pr.created_at) as time_to_merge\n    from\n      gha_pull_requests pr,\n      gha_repos r\n    where\n      pr.dup_repo_id = r.id\n      and pr.dup_repo_name = r.name\n      and r.repo_group in ([[repogroups]])\n      and pr.merged_at is not null\n      and pr.dup_type = 'PullRequestEvent'\n      and pr.merged_at \u003e= now() - '2 month'::interval\n      and pr.merged_at \u003c now() - '1 month'::interval\n      and (pr.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n    group by\n      pr.id\n  ) sub\n)\nselect\n  ((curr.value - prev.value) * 100.0) / (case prev.value when 0 then 1 else prev.value end) as \"value\"\nfrom\n  prev,\n  curr",
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "table": "sall_prs_merged",
            "timeColumnType": "timestamp",
            "group": [],
            "metricColumn": "none"
          }
        ],
        "title": "",
        "colorBackground": false,
        "format": "none",
        "interval": "1h",
        "maxDataPoints": 100,
        "valueMaps": [],
        "cacheTimeout": null,
        "mappingTypes": [
          {
            "name": "value to text",
            "value": 1
          },
          {
            "value": 2,
            "name": "range to text"
          }
        ],
        "tableColumn": "value",
        "prefix": "Avg merge time change",
        "sparkline": {
          "full": false,
          "lineColor": "rgb(31, 120, 193)",
          "show": false,
          "fillColor": "rgba(31, 118, 189, 0.18)"
        },
        "links": [],
        "options": {
          
        },
        "timeFrom": null,
        "valueFontSize": "50%",
        "colorPrefix": true,
        "gauge": {
          "maxValue": 100,
          "minValue": 0,
          "show": false,
          "thresholdLabels": false,
          "thresholdMarkers": true
        },
        "gridPos": {
          "x": 4,
          "y": 5,
          "h": 1,
          "w": 5
        },
        "id": 13,
        "postfix": "%",
        "timeShift": null,
        "colorPostfix": true,
        "colorValue": true,
        "nullPointMode": "connected",
        "nullText": null,
        "colors": [
          "#56A64B",
          "#FFF899",
          "#C4162A"
        ],
        "decimals": 1,
        "description": "Change of the median time to merge PRs this month vs. previous month.",
        "postfixFontSize": "30%",
        "thresholds": "-20,20",
        "mappingType": 1,
        "transparent": true,
        "type": "singlestat",
        "valueName": "current"
      },
      {
        "countdownSettings": {
          "endCountdownTime": "2019-06-26T11:41:00.000Z",
          "endText": "00:00:00",
          "customFormat": null
        },
        "description": "",
        "timezone": null,
        "type": "grafana-clock-panel",
        "refreshSettings": {
          "syncWithDashboard": false
        },
        "title": "",
        "transparent": true,
        "dateSettings": {
          "dateFormat": "MM/DD/YYYY",
          "fontSize": "16px",
          "fontWeight": "normal",
          "showDate": true
        },
        "id": 24,
        "interval": "1h",
        "options": {
          
        },
        "gridPos": {
          "h": 2,
          "w": 5,
          "x": 4,
          "y": 6
        },
        "timeSettings": {
          "customFormat": "HH:mm:ss",
          "fontSize": "16px",
          "fontWeight": "normal"
        },
        "timezoneSettings": {
          "fontSize": "12px",
          "fontWeight": "normal",
          "showTimezone": false,
          "zoneFormat": "offsetAbbv"
        },
        "targets": [
          {
            "rawQuery": true,
            "select": [
              [
                {
                  "type": "column",
                  "params": [
                    "value"
                  ]
                }
              ]
            ],
            "timeColumn": "\"time\"",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "refId": "A",
            "table": "shpr_comps",
            "timeColumnType": "timestamp",
            "format": "time_series",
            "group": [],
            "metricColumn": "none",
            "rawSql": "select 1"
          }
        ],
        "timeFrom": null,
        "timeShift": null,
        "bgColor": "rgba(20, 33, 46, 0)",
        "clockType": "12 hour",
        "links": [],
        "mode": "time"
      },
      {
        "targets": [
          {
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "sha"
                  ],
                  "type": "column"
                },
                {
                  "params": [
                    "count"
                  ],
                  "type": "aggregate"
                },
                {
                  "params": [
                    "author_id"
                  ],
                  "type": "alias"
                }
              ]
            ],
            "table": "gha_commits",
            "format": "time_series",
            "rawSql": "select\n  $__timeGroupAlias(c.dup_created_at,1h),\n  count(distinct c.sha) as \"commits\"\nfrom\n  gha_commits c,\n  gha_repos r\nwhere\n  c.dup_repo_id = r.id\n  and c.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(c.dup_created_at)\n  and (c.dup_author_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  1",
            "rawQuery": true,
            "timeColumn": "dup_created_at",
            "timeColumnType": "timestamp",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "group": [
              {
                "params": [
                  "1h",
                  "none"
                ],
                "type": "time"
              }
            ],
            "metricColumn": "none"
          }
        ],
        "timeShift": null,
        "title": "Last month commits per day and hour",
        "transparent": true,
        "type": "neocat-cal-heatmap-panel",
        "config": {
          "subDomainTitleFormat": {
            "empty": "{date}",
            "filled": {
              
            }
          },
          "verticalOrientation": true,
          "cellPadding": "-1",
          "colLimit": "24",
          "itemName": [
            "short",
            "short"
          ],
          "legendStr": "",
          "legendTitleFormat": {
            "inner": {
              
            },
            "lower": {
              
            },
            "upper": {
              
            }
          },
          "cellRadius": "0",
          "domainGutter": 2,
          "hoverDecimals": 0,
          "rowLimit": "1",
          "legendColors": {
            "max": "#37872D",
            "min": "rgb(0, 0, 0)",
            "base": "transparent",
            "empty": "rgb(0, 0, 0)"
          },
          "linkTemplate": "",
          "subDomain": "hour",
          "cellSize": "15",
          "displayLegend": true,
          "domain": "day",
          "hoverUnitFormat": "short",
          "label": {
            "position": "bottom",
            "rotate": "null",
            "width": 60
          },
          "animationDuration": 0
        },
        "gridPos": {
          "h": 16,
          "w": 5,
          "x": 0,
          "y": 8
        },
        "interval": "1h",
        "links": [],
        "options": {
          
        },
        "timeFrom": null,
        "description": "Commits per day of month and hour.",
        "id": 26
      },
      {
        "maxDataPoints": 3,
        "targets": [
          {
            "rawSql": "select\n  now() as \"time\",\n  count(distinct e.id) as \"value\",\n  e.dup_repo_name as \"name\"\nfrom\n  gha_events e,\n  gha_repos r\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(e.created_at)\n  and e.type in ('IssuesEvent', 'PullRequestEvent', 'PushEvent', 'PullRequestReviewCommentEvent', 'IssueCommentEvent', 'CommitCommentEvent')\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(e.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  e.dup_repo_name\norder by\n  value desc\nlimit\n  50",
            "table": "sall_prs_merged",
            "timeColumn": "\"time\"",
            "where": [
              {
                "type": "macro",
                "name": "$__timeFilter",
                "params": []
              }
            ],
            "format": "time_series",
            "metricColumn": "none",
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "timeColumnType": "timestamp",
            "group": [],
            "rawQuery": true
          }
        ],
        "type": "grafana-piechart-panel",
        "decimals": null,
        "fontSize": "60%",
        "format": "short",
        "gridPos": {
          "h": 11,
          "w": 6,
          "x": 5,
          "y": 8
        },
        "interval": "1h",
        "valueName": "current",
        "timeFrom": null,
        "title": "Top 50 repositories",
        "aliasColors": {
          
        },
        "description": "Top 50 repositories by the number of contributions, all having less than 1% merged into 'Others'.",
        "id": 16,
        "nullPointMode": "connected",
        "strokeWidth": "1",
        "breakPoint": "50%",
        "cacheTimeout": null,
        "legendType": "On graph",
        "transparent": true,
        "timeShift": null,
        "combine": {
          "label": "Others",
          "threshold": "0.01"
        },
        "legend": {
          "header": "",
          "percentage": true,
          "percentageDecimals": 1,
          "show": true,
          "sideWidth": 140,
          "values": true
        },
        "links": [],
        "options": {
          
        },
        "pieType": "donut"
      },
      {
        "combine": {
          "label": "Others",
          "threshold": "0.01"
        },
        "gridPos": {
          "y": 8,
          "h": 10,
          "w": 6,
          "x": 11
        },
        "legendType": "On graph",
        "nullPointMode": "connected",
        "targets": [
          {
            "where": [
              {
                "type": "macro",
                "name": "$__timeFilter",
                "params": []
              }
            ],
            "metricColumn": "none",
            "rawQuery": true,
            "rawSql": "select\n  now() as \"time\",\n  count(distinct e.id) as \"value\",\n  coalesce(affs.company_name, 'Unknown') as \"name\"\nfrom\n  gha_repos r,\n  gha_events e\nleft join\n  gha_actors_affiliations affs\non\n  e.actor_id = affs.actor_id\n  and affs.dt_from \u003c= e.created_at\n  and affs.dt_to \u003e e.created_at\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(e.created_at)\n  and e.type in ('IssuesEvent', 'PullRequestEvent', 'PushEvent', 'PullRequestReviewCommentEvent', 'IssueCommentEvent', 'CommitCommentEvent')\n  and affs.company_name is not null\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(e.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  affs.company_name\norder by\n  value desc\nlimit\n  50",
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "table": "sall_prs_merged",
            "timeColumn": "\"time\"",
            "format": "time_series",
            "group": [],
            "timeColumnType": "timestamp"
          }
        ],
        "valueName": "current",
        "maxDataPoints": 3,
        "title": "Top 50 contributing companies",
        "aliasColors": {
          
        },
        "breakPoint": "50%",
        "description": "Top 50 contributing companies, all companies having less than 1% merged into 'Others'.",
        "id": 17,
        "interval": "1h",
        "legend": {
          "show": true,
          "sideWidth": 140,
          "values": true,
          "header": "",
          "percentage": true,
          "percentageDecimals": 1
        },
        "cacheTimeout": null,
        "decimals": null,
        "options": {
          
        },
        "pieType": "donut",
        "timeFrom": null,
        "type": "grafana-piechart-panel",
        "fontSize": "60%",
        "format": "short",
        "links": [],
        "strokeWidth": "1",
        "timeShift": null,
        "transparent": true
      },
      {
        "strokeWidth": "1",
        "timeShift": null,
        "breakPoint": "50%",
        "combine": {
          "label": "Others",
          "threshold": "0.01"
        },
        "fontSize": "60%",
        "format": "short",
        "gridPos": {
          "h": 10,
          "w": 6,
          "x": 17,
          "y": 8
        },
        "id": 20,
        "title": "Top 50 contributors",
        "type": "grafana-piechart-panel",
        "aliasColors": {
          
        },
        "decimals": null,
        "links": [],
        "nullPointMode": "connected",
        "pieType": "donut",
        "cacheTimeout": null,
        "interval": "1h",
        "legend": {
          "percentage": true,
          "percentageDecimals": 1,
          "show": true,
          "sideWidth": 140,
          "values": true,
          "header": ""
        },
        "maxDataPoints": 3,
        "options": {
          
        },
        "targets": [
          {
            "rawSql": "select\n  now() as \"time\",\n  count(distinct e.id) as \"value\",\n  e.dup_actor_login as \"name\"\nfrom\n  gha_events e,\n  gha_repos r\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(e.created_at)\n  and e.type in ('IssuesEvent', 'PullRequestEvent', 'PushEvent', 'PullRequestReviewCommentEvent', 'IssueCommentEvent', 'CommitCommentEvent')\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(e.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  e.dup_actor_login\norder by\n  value desc\nlimit\n  50",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "format": "time_series",
            "group": [],
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "table": "sall_prs_merged",
            "timeColumn": "\"time\"",
            "timeColumnType": "timestamp",
            "metricColumn": "none",
            "rawQuery": true
          }
        ],
        "description": "Top 50 contributors, all contributors having less than 1% merged into 'Others'.",
        "legendType": "On graph",
        "timeFrom": null,
        "transparent": true,
        "valueName": "current"
      },
      {
        "description": "Top 50 committing companies, all companies having less than 1% merged into 'Others'.",
        "id": 21,
        "options": {
          
        },
        "pieType": "donut",
        "timeShift": null,
        "title": "Top 50 committing companies",
        "cacheTimeout": null,
        "decimals": null,
        "legendType": "On graph",
        "maxDataPoints": 3,
        "strokeWidth": "1",
        "timeFrom": null,
        "type": "grafana-piechart-panel",
        "aliasColors": {
          
        },
        "breakPoint": "50%",
        "format": "short",
        "interval": "1h",
        "legend": {
          "header": "",
          "percentage": true,
          "percentageDecimals": 1,
          "show": true,
          "sideWidth": 140,
          "values": true
        },
        "nullPointMode": "connected",
        "transparent": true,
        "valueName": "current",
        "combine": {
          "label": "Others",
          "threshold": "0.01"
        },
        "fontSize": "60%",
        "targets": [
          {
            "rawQuery": true,
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "format": "time_series",
            "group": [],
            "metricColumn": "none",
            "rawSql": "select\n  now() as \"time\",\n  count(distinct c.sha) as \"value\",\n  coalesce(affs.company_name, 'Unknown') as \"name\"\nfrom\n  gha_repos r,\n  gha_commits c\nleft join\n  gha_actors_affiliations affs\non\n  c.author_id = affs.actor_id\n  and affs.dt_from \u003c= c.dup_created_at\n  and affs.dt_to \u003e c.dup_created_at\nwhere\n  c.dup_repo_id = r.id\n  and c.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(c.dup_created_at)\n  and affs.company_name is not null\n  and (c.dup_author_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  affs.company_name\norder by\n  value desc\nlimit\n  50",
            "table": "sall_prs_merged",
            "timeColumn": "\"time\"",
            "timeColumnType": "timestamp"
          }
        ],
        "gridPos": {
          "h": 10,
          "w": 6,
          "x": 11,
          "y": 18
        },
        "links": []
      },
      {
        "combine": {
          "label": "Others",
          "threshold": "0.01"
        },
        "nullPointMode": "connected",
        "pieType": "donut",
        "targets": [
          {
            "refId": "A",
            "table": "sall_prs_merged",
            "timeColumn": "\"time\"",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "format": "time_series",
            "metricColumn": "none",
            "rawSql": "select\n  now() as \"time\",\n  count(distinct c.sha) as \"value\",\n  c.dup_author_login as \"name\"\nfrom\n  gha_commits c,\n  gha_repos r\nwhere\n  c.dup_repo_id = r.id\n  and c.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(c.dup_created_at)\n  and c.dup_author_login != ''\n  and (c.dup_author_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  c.dup_author_login\norder by\n  value desc\nlimit\n  50",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "timeColumnType": "timestamp",
            "group": [],
            "rawQuery": true
          }
        ],
        "breakPoint": "50%",
        "id": 22,
        "options": {
          
        },
        "strokeWidth": "1",
        "type": "grafana-piechart-panel",
        "valueName": "current",
        "legend": {
          "percentageDecimals": 1,
          "show": true,
          "sideWidth": 140,
          "values": true,
          "header": "",
          "percentage": true
        },
        "maxDataPoints": 3,
        "aliasColors": {
          
        },
        "cacheTimeout": null,
        "fontSize": "60%",
        "format": "short",
        "gridPos": {
          "h": 10,
          "w": 6,
          "x": 17,
          "y": 18
        },
        "interval": "1h",
        "timeFrom": null,
        "timeShift": null,
        "title": "Top 50 committers",
        "transparent": true,
        "decimals": null,
        "description": "Top 50 committers, all contributors having less than 1% merged into 'Others'.",
        "legendType": "On graph",
        "links": []
      },
      {
        "gridPos": {
          "w": 6,
          "x": 5,
          "y": 19,
          "h": 9
        },
        "targets": [
          {
            "timeColumnType": "timestamp",
            "format": "time_series",
            "group": [],
            "hide": false,
            "rawSql": "select\n  now() as \"time\",\n  count(distinct pr.id) as \"value\",\n  'PRs' as \"metric\"\nfrom\n  gha_pull_requests pr,\n  gha_repos r\nwhere\n  pr.dup_repo_id = r.id\n  and pr.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and (pr.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and pr.dup_type = 'PullRequestEvent'\n  and $__timeFilter(pr.created_at)\n  and lower(pr.dup_user_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\nunion select\n  now() as \"time\",\n  count(distinct i.id) as \"value\",\n  'Issues' as \"metric\"\nfrom\n  gha_issues i,\n  gha_repos r\nwhere\n  i.dup_repo_id = r.id\n  and i.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and i.dup_type = 'IssuesEvent'\n  and $__timeFilter(i.created_at)\n  and (i.dup_user_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(i.dup_user_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\nunion select\n  now() as \"time\",\n  count(distinct pr.event_id) as \"value\",\n  'Reviews' as \"metric\"\nfrom\n  gha_pull_requests pr,\n  gha_repos r\nwhere\n  pr.dup_repo_id = r.id\n  and pr.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and pr.dup_type = 'PullRequestReviewCommentEvent'\n  and $__timeFilter(pr.dup_created_at)\n  and (pr.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(pr.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\nunion select\n  now() as \"time\",\n  count(distinct e.id) as \"value\",\n  'Comments' as \"metric\"\nfrom\n  gha_events e,\n  gha_repos r\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and e.type in ('IssueCommentEvent', 'CommitCommentEvent')\n  and $__timeFilter(e.created_at)\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(e.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\nunion select\n  now() as \"time\",\n  count(distinct c.sha) as \"value\",\n  'Commits' as \"metric\"\nfrom\n  gha_commits c,\n  gha_repos r\nwhere\n  c.dup_repo_id = r.id\n  and c.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(c.dup_created_at)\n  and (c.dup_author_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\norder by\n  \"metric\"",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "table": "sall_prs_merged",
            "timeColumn": "\"time\"",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "metricColumn": "none",
            "rawQuery": true,
            "refId": "A"
          }
        ],
        "transparent": true,
        "type": "snuids-radar-panel",
        "title": "",
        "bgColor": "rgba(0, 0, 0, 0)",
        "interval": "1h",
        "options": {
          
        },
        "timeFrom": null,
        "id": 19,
        "links": [],
        "radarSettings": {
          "drawTicksBackground": false,
          "scaleMin": "1",
          "seriesAlias": "A=Contributions;",
          "aspectRatio": 2,
          "autoScale": true,
          "legendType": "top",
          "scaleMax": "10",
          "scaleStep": "5",
          "animationDurationMs": "1",
          "fontSize": 14,
          "ignoreTimeInfluxDB": false,
          "limitAspectRatio": true,
          "fontColor": "#C0D8FF",
          "gridColor": "gray"
        },
        "timeShift": null,
        "description": "Contributions graph"
      },
      {
        "transparent": true,
        "aliasColors": {
          
        },
        "id": 28,
        "nullPointMode": "null",
        "title": "",
        "interval": "1h",
        "lines": true,
        "steppedLine": false,
        "linewidth": 1,
        "seriesOverrides": [],
        "spaceLength": 10,
        "timeFrom": null,
        "dashLength": 10,
        "dashes": false,
        "description": "Contributions over time",
        "type": "graph",
        "targets": [
          {
            "timeColumn": "\"time\"",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "rawQuery": true,
            "rawSql": "select\n  $__timeGroupAlias(e.created_at,1h),\n  count(distinct e.id) as \"contributions\"\nfrom\n  gha_events e,\n  gha_repos r\nwhere\n  e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(e.created_at)\n  and e.type in ('IssuesEvent', 'PullRequestEvent', 'PushEvent', 'PullRequestReviewCommentEvent', 'IssueCommentEvent', 'CommitCommentEvent')\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(e.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  1",
            "refId": "A",
            "table": "shpr_comps",
            "timeColumnType": "timestamp",
            "format": "time_series",
            "group": [],
            "metricColumn": "none",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ]
          }
        ],
        "timeRegions": [],
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "gridPos": {
          "h": 4,
          "w": 5,
          "x": 0,
          "y": 24
        },
        "points": false,
        "renderer": "flot",
        "timeShift": null,
        "xaxis": {
          "mode": "time",
          "name": null,
          "show": false,
          "values": [],
          "buckets": null
        },
        "fill": 0,
        "links": [],
        "thresholds": [],
        "tooltip": {
          "shared": true,
          "sort": 0,
          "value_type": "individual"
        },
        "yaxes": [
          {
            "show": false,
            "format": "short",
            "label": null,
            "logBase": 1,
            "max": null,
            "min": null
          },
          {
            "format": "short",
            "label": null,
            "logBase": 1,
            "max": null,
            "min": null,
            "show": false
          }
        ],
        "bars": false,
        "legend": {
          "current": false,
          "max": false,
          "min": false,
          "show": false,
          "total": false,
          "values": false,
          "avg": false
        },
        "stack": false,
        "options": {
          
        },
        "percentage": false,
        "pointradius": 2
      }
    ],
    "refresh": "15m",
    "tags": [
      "cii",
      "dashboard"
    ]
  }


slug: home2
title: Home2
created: 2024-04-09 11:21:31.416081928+00:00
updated: 2024-04-09 11:21:31.416082019+00:00
uid: 63
data:
  {
    "title": "Home2",
    "editable": true,
    "iteration": 1561708084581,
    "links": [],
    "tags": [
      "cii",
      "dashboard"
    ],
    "time": {
      "from": "now-1M",
      "to": "now"
    },
    "graphTooltip": 0,
    "panels": [
      {
        "timeFrom": null,
        "title": "Last month LOC statistics",
        "type": "table",
        "description": "Shows average, median, 15th and 85th percentiles for commits lines added, lines removed and files changed. Alerts: green: OK, blue - value too low, red - value too high.",
        "interval": "1h",
        "styles": [
          {
            "thresholds": [
              "200",
              "2000"
            ],
            "type": "number",
            "unit": "short",
            "alias": "",
            "colorMode": "cell",
            "colors": [
              "#1F60C4",
              "#37872D",
              "rgba(245, 54, 54, 0.9)"
            ],
            "decimals": 1,
            "pattern": "Average LOC added"
          },
          {
            "colorMode": "cell",
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "decimals": 1,
            "pattern": "Max LOC added",
            "unit": "none",
            "alias": "",
            "colors": [
              "#1F60C4",
              "#37872D",
              "rgba(245, 54, 54, 0.9)"
            ],
            "mappingType": 1,
            "thresholds": [
              "1000",
              "100000"
            ],
            "type": "number"
          },
          {
            "pattern": "Median LOC added",
            "unit": "none",
            "alias": "",
            "colorMode": "cell",
            "colors": [
              "#1F60C4",
              "#37872D",
              "rgba(245, 54, 54, 0.9)"
            ],
            "decimals": 1,
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "mappingType": 1,
            "thresholds": [
              "10",
              "200"
            ],
            "type": "number"
          },
          {
            "alias": "",
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "pattern": "15th perc. LOC added",
            "unit": "none",
            "colorMode": "cell",
            "colors": [
              "#1F60C4",
              "#37872D",
              "rgba(245, 54, 54, 0.9)"
            ],
            "decimals": 1,
            "mappingType": 1,
            "thresholds": [
              "1",
              "5"
            ],
            "type": "number"
          },
          {
            "colorMode": "cell",
            "colors": [
              "#1F60C4",
              "#37872D",
              "#C4162A"
            ],
            "mappingType": 1,
            "type": "number",
            "alias": "",
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "decimals": 1,
            "pattern": "85th perc. LOC added",
            "thresholds": [
              "100",
              "2000"
            ],
            "unit": "none"
          },
          {
            "colorMode": "cell",
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "pattern": "Average LOC removed",
            "thresholds": [
              "100",
              "2000"
            ],
            "type": "number",
            "unit": "none",
            "alias": "",
            "colors": [
              "#1F60C4",
              "#37872D",
              "rgba(245, 54, 54, 0.9)"
            ],
            "decimals": 1,
            "mappingType": 1
          },
          {
            "colors": [
              "#1F60C4",
              "#37872D",
              "rgba(245, 54, 54, 0.9)"
            ],
            "pattern": "Max LOC removed",
            "thresholds": [
              "1000",
              "100000"
            ],
            "type": "number",
            "alias": "",
            "colorMode": "cell",
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "decimals": 1,
            "mappingType": 1,
            "unit": "none"
          },
          {
            "decimals": 1,
            "pattern": "Median LOC removed",
            "thresholds": [
              "5",
              "100"
            ],
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "mappingType": 1,
            "type": "number",
            "unit": "none",
            "alias": "",
            "colorMode": "cell",
            "colors": [
              "#1F60C4",
              "#37872D",
              "rgba(245, 54, 54, 0.9)"
            ]
          },
          {
            "colorMode": "cell",
            "mappingType": 1,
            "pattern": "15th perc. LOC removed",
            "thresholds": [
              "1",
              "5"
            ],
            "type": "number",
            "unit": "none",
            "alias": "",
            "colors": [
              "#1F60C4",
              "#37872D",
              "rgba(245, 54, 54, 0.9)"
            ],
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "decimals": 1
          },
          {
            "type": "number",
            "colorMode": "cell",
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "decimals": 1,
            "mappingType": 1,
            "thresholds": [
              "50",
              "2000"
            ],
            "alias": "",
            "colors": [
              "#1F60C4",
              "#37872D",
              "rgba(245, 54, 54, 0.9)"
            ],
            "pattern": "85th perc. LOC removed",
            "unit": "none"
          },
          {
            "pattern": "Average files ch.",
            "thresholds": [
              "2",
              "20"
            ],
            "mappingType": 1,
            "type": "number",
            "unit": "none",
            "alias": "",
            "colorMode": "cell",
            "colors": [
              "#1F60C4",
              "#37872D",
              "rgba(245, 54, 54, 0.9)"
            ],
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "decimals": 1
          },
          {
            "pattern": "Max files ch.",
            "thresholds": [
              "50",
              "1000"
            ],
            "type": "number",
            "colors": [
              "#1F60C4",
              "#37872D",
              "rgba(245, 54, 54, 0.9)"
            ],
            "colorMode": "cell",
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "decimals": 1,
            "mappingType": 1,
            "unit": "none",
            "alias": ""
          },
          {
            "alias": "",
            "colors": [
              "#1F60C4",
              "#37872D",
              "rgba(245, 54, 54, 0.9)"
            ],
            "mappingType": 1,
            "type": "number",
            "thresholds": [
              "2",
              "5"
            ],
            "unit": "none",
            "colorMode": "cell",
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "decimals": 1,
            "pattern": "Median files ch."
          },
          {
            "mappingType": 1,
            "pattern": "15th perc. files ch.",
            "thresholds": [
              "1",
              "2"
            ],
            "type": "number",
            "unit": "none",
            "alias": "",
            "colorMode": "cell",
            "colors": [
              "#1F60C4",
              "#37872D",
              "rgba(245, 54, 54, 0.9)"
            ],
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "decimals": 1
          },
          {
            "alias": "",
            "decimals": 1,
            "mappingType": 1,
            "thresholds": [
              "5",
              "20"
            ],
            "type": "number",
            "unit": "none",
            "colorMode": "cell",
            "colors": [
              "#1F60C4",
              "#37872D",
              "rgba(245, 54, 54, 0.9)"
            ],
            "dateFormat": "YYYY-MM-DD HH:mm:ss",
            "pattern": "85th perc. files ch."
          }
        ],
        "sort": {
          "col": 0,
          "desc": true
        },
        "transform": "table",
        "id": 4,
        "links": [],
        "scroll": false,
        "showHeader": true,
        "timeShift": null,
        "cacheTimeout": null,
        "columns": [],
        "pageSize": null,
        "targets": [
          {
            "table": "shpr_comps",
            "format": "table",
            "group": [],
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "refId": "A",
            "timeColumn": "\"time\"",
            "timeColumnType": "timestamp",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "metricColumn": "none",
            "rawQuery": true,
            "rawSql": "select\n  avg(sub.loc_added) filter (where sub.loc_added \u003e 0) as \"Average LOC added\",\n  max(sub.loc_added) as \"Max LOC added\",\n  percentile_cont(0.5) within group (order by sub.loc_added asc) filter (where sub.loc_added \u003e 0) as \"Median LOC added\",\n  percentile_cont(0.15) within group (order by sub.loc_added asc) filter (where sub.loc_added \u003e 0) as \"15th perc. LOC added\",\n  percentile_cont(0.85) within group (order by sub.loc_added asc) filter (where sub.loc_added \u003e 0) as \"85th perc. LOC added\",\n  avg(sub.loc_removed) filter (where sub.loc_removed \u003e 0) as \"Average LOC removed\",\n  max(sub.loc_removed) as \"Max LOC removed\",\n  percentile_cont(0.5) within group (order by sub.loc_removed asc) filter (where sub.loc_removed \u003e 0) as \"Median LOC removed\",\n  percentile_cont(0.15) within group (order by sub.loc_removed asc) filter (where sub.loc_removed \u003e 0) as \"15th perc. LOC removed\",\n  percentile_cont(0.85) within group (order by sub.loc_removed asc) filter (where sub.loc_removed \u003e 0) as \"85th perc. LOC removed\",\n  avg(sub.files_changed) filter (where sub.files_changed \u003e 0) as \"Average files ch.\",\n  max(sub.files_changed) as \"Max files ch.\",\n  percentile_cont(0.5) within group (order by sub.files_changed asc) filter (where sub.files_changed \u003e 0) as \"Median files ch.\",\n  percentile_cont(0.15) within group (order by sub.files_changed asc) filter (where sub.files_changed \u003e 0) as \"15th perc. files ch.\",\n  percentile_cont(0.85) within group (order by sub.files_changed asc) filter (where sub.files_changed \u003e 0) as \"85th perc. files ch.\"\nfrom (\n  select distinct\n    c.sha,\n    c.loc_added,\n    c.loc_removed,\n    c.files_changed\n  from\n    gha_commits c,\n    gha_repos r\n  where\n    c.dup_repo_id = r.id\n    and c.dup_repo_name = r.name\n    and r.repo_group in ([[repogroups]])\n    and c.loc_added is not null\n    and c.loc_removed is not null\n    and c.files_changed is not null\n    and c.files_changed \u003e 0\n    and (c.loc_added \u003e 0 or c.loc_removed \u003e 0)\n    and $__timeFilter(c.dup_created_at)\n    and (c.dup_author_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n    and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\n) sub"
          }
        ],
        "transparent": true,
        "fontSize": "80%",
        "gridPos": {
          "w": 24,
          "x": 0,
          "y": 0,
          "h": 3
        },
        "options": {
          
        }
      },
      {
        "format": "short",
        "id": 2,
        "strokeWidth": 1,
        "cacheTimeout": null,
        "description": "Number of distinct commits modifying files with a given extension during the last month",
        "gridPos": {
          "h": 15,
          "w": 6,
          "x": 0,
          "y": 3
        },
        "legendType": "On graph",
        "links": [],
        "nullPointMode": "connected",
        "timeFrom": null,
        "title": "Last month top commits files extensions",
        "aliasColors": {
          
        },
        "interval": "1h",
        "maxDataPoints": 3,
        "targets": [
          {
            "rawQuery": true,
            "rawSql": "select\n  now() as \"time\",\n  count(distinct ecf.sha) as \"value\",\n  ecf.ext as \"name\"\nfrom\n  gha_events_commits_files ecf,\n  gha_events e,\n  gha_repos r\nwhere\n  e.id = ecf.event_id\n  and e.repo_id = r.id\n  and e.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and $__timeFilter(e.created_at)\n  and ecf.ext not like '%/%'\n  and ecf.ext != ''\n  and (e.dup_actor_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(e.dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\ngroup by\n  ecf.ext\norder by\n  \"value\" desc\nlimit 50",
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "timeColumn": "\"time\"",
            "timeColumnType": "timestamp",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "format": "time_series",
            "group": [],
            "metricColumn": "none",
            "table": "shpr_comps"
          }
        ],
        "transparent": true,
        "type": "grafana-piechart-panel",
        "valueName": "current",
        "breakPoint": "50%",
        "fontSize": "60%",
        "legend": {
          "values": true,
          "percentage": true,
          "percentageDecimals": 1,
          "show": true
        },
        "options": {
          
        },
        "pieType": "donut",
        "timeShift": null,
        "combine": {
          "label": "Others",
          "threshold": "0.01"
        }
      },
      {
        "timeRegions": [],
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": []
        },
        "yaxes": [
          {
            "min": null,
            "show": true,
            "decimals": null,
            "format": "short",
            "label": null,
            "logBase": 2,
            "max": null
          },
          {
            "label": null,
            "logBase": 1,
            "max": null,
            "min": null,
            "show": true,
            "format": "short"
          }
        ],
        "links": [],
        "aliasColors": {
          
        },
        "renderer": "flot",
        "tooltip": {
          "sort": 0,
          "value_type": "individual",
          "shared": true
        },
        "stack": false,
        "thresholds": [],
        "timeShift": null,
        "decimals": null,
        "id": 6,
        "legend": {
          "alignAsTable": true,
          "avg": false,
          "max": true,
          "total": false,
          "current": true,
          "min": true,
          "rightSide": false,
          "show": true,
          "values": true
        },
        "linewidth": 2,
        "pointradius": 2,
        "title": "LOC statistics chart",
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "points": true,
        "timeFrom": null,
        "bars": false,
        "dashes": false,
        "description": "Chart for all LOC statistics for all days during the last month. Displays 30th and 70th percentiles.",
        "interval": "1h",
        "lines": true,
        "dashLength": 10,
        "gridPos": {
          "h": 15,
          "w": 18,
          "x": 6,
          "y": 3
        },
        "percentage": false,
        "spaceLength": 10,
        "type": "graph",
        "nullPointMode": "null as zero",
        "options": {
          
        },
        "seriesOverrides": [
          {
            "alias": "70th percentile files changed daily",
            "color": "#3274D9",
            "fill": 2,
            "linewidth": 0,
            "steppedLine": true,
            "yaxis": 2
          },
          {
            "alias": "70th percentile LOC added daily",
            "color": "#56A64B"
          },
          {
            "alias": "70th percentile LOC removed daily",
            "color": "#C4162A"
          },
          {
            "alias": "30th percentile files changed daily",
            "color": "rgb(77, 99, 115)",
            "fill": 4,
            "linewidth": 0,
            "steppedLine": true,
            "yaxis": 2
          },
          {
            "alias": "30th percentile LOC added daily",
            "color": "#37872D"
          },
          {
            "alias": "30th percentile LOC removed daily",
            "color": "#E02F44"
          }
        ],
        "steppedLine": false,
        "fill": 0,
        "targets": [
          {
            "table": "shpr_comps",
            "where": [
              {
                "type": "macro",
                "name": "$__timeFilter",
                "params": []
              }
            ],
            "group": [],
            "rawQuery": true,
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "timeColumnType": "timestamp",
            "format": "time_series",
            "metricColumn": "none",
            "rawSql": "select\n  floor(extract(epoch from dup_created_at)/86400)*86400 AS \"time\",\n  percentile_cont(0.7) within group (order by loc_added asc) as \"70th percentile LOC added daily\",\n  percentile_cont(0.3) within group (order by loc_added asc) as \"30th percentile LOC added daily\"\nfrom\n  gha_commits c,\n  gha_repos r\nwhere\n  c.dup_repo_id = r.id\n  and c.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and (c.dup_author_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\n  and loc_added is not null\n  and loc_added \u003e 0\n  and $__timeFilter(dup_created_at)\ngroup by\n  \"time\"\norder by\n  \"time\"",
            "timeColumn": "\"time\""
          },
          {
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "table": "shpr_comps",
            "timeColumn": "\"time\"",
            "where": [
              {
                "params": [],
                "type": "macro",
                "name": "$__timeFilter"
              }
            ],
            "format": "time_series",
            "metricColumn": "none",
            "rawSql": "select\n  floor(extract(epoch from dup_created_at)/86400)*86400 AS \"time\",\n  percentile_cont(0.7) within group (order by loc_removed asc) as \"70th percentile LOC removed daily\",\n  percentile_cont(0.3) within group (order by loc_removed asc) as \"30th percentile LOC removed daily\"\nfrom\n  gha_commits c,\n  gha_repos r\nwhere\n  c.dup_repo_id = r.id\n  and c.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and (c.dup_author_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\n  and loc_removed is not null\n  and loc_removed \u003e 0\n  and $__timeFilter(dup_created_at)\ngroup by\n  \"time\"\norder by\n  \"time\"",
            "refId": "B",
            "timeColumnType": "timestamp",
            "group": [],
            "rawQuery": true
          },
          {
            "timeColumn": "\"time\"",
            "timeColumnType": "timestamp",
            "group": [],
            "refId": "C",
            "table": "shpr_comps",
            "rawSql": "select\n  floor(extract(epoch from dup_created_at)/86400)*86400 AS \"time\",\n  percentile_cont(0.7) within group (order by files_changed asc) as \"70th percentile files changed daily\",\n  percentile_cont(0.3) within group (order by files_changed asc) as \"30th percentile files changed daily\"\nfrom\n  gha_commits c,\n  gha_repos r\nwhere\n  c.dup_repo_id = r.id\n  and c.dup_repo_name = r.name\n  and r.repo_group in ([[repogroups]])\n  and (c.dup_author_login in ([[contributors]]) or '[[contributors:csv]]' = 'null')\n  and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\n  and files_changed is not null\n  and files_changed \u003e 0\n  and $__timeFilter(dup_created_at)\ngroup by\n  \"time\"\norder by\n  \"time\"",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "format": "time_series",
            "metricColumn": "none",
            "rawQuery": true
          }
        ],
        "transparent": true
      },
      {
        "columns": [],
        "timeFrom": null,
        "title": "Throughput",
        "transparent": true,
        "description": "Throughput measures the amount of productive code written by a developer. By that we mean new lines of code written.",
        "links": [],
        "pageSize": 200,
        "styles": [
          {
            "pattern": "Time",
            "type": "date",
            "alias": "Time",
            "dateFormat": "YYYY-MM-DD HH:mm:ss"
          },
          {
            "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": "none"
          }
        ],
        "type": "table",
        "interval": "1h",
        "options": {
          
        },
        "scroll": true,
        "timeShift": null,
        "targets": [
          {
            "format": "table",
            "timeColumn": "\"time\"",
            "timeColumnType": "timestamp",
            "rawSql": "select \n  sub2.\"Committer\",\n  sub2.\"Throughput\",\n  sub2.\"Previous Throughput\",\n  case sub2.\"Ratio\" \u003e 0 when true then '+' || round(sub2.\"Ratio\", 1)::text || '%' else round(sub2.\"Ratio\", 1)::text || '%' end as \"Change\"\nfrom (\n  select\n    sub.\"Committer\",\n    sub.\"Throughput\",\n    sub.\"Previous Throughput\",\n    100.0 * (sub.\"Throughput\" - sub.\"Previous Throughput\") / sub.\"Previous Throughput\" as \"Ratio\"\n  from (\n    select\n      c.dup_author_login as \"Committer\",\n      sum(c.loc_added) filter (where c.dup_created_at \u003e= now() - '1 month'::interval) as \"Throughput\",\n      sum(c.loc_added) filter (where c.dup_created_at \u003c now() - '1 month'::interval) as \"Previous Throughput\"\n    from\n      gha_commits c,\n      gha_repos r\n    where\n      c.dup_repo_id = r.id\n      and c.dup_repo_name = r.name\n      and r.repo_group in ([[repogroups]])\n      and lower(c.dup_author_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%'])\n      and c.loc_added is not null\n      and c.loc_added \u003e 0\n      and c.dup_created_at \u003e= now() - '2 months'::interval\n      and dup_author_login != ''\n    group by\n      c.dup_author_login\n  ) sub\n  where\n    sub.\"Throughput\" \u003e 0\n    and sub.\"Previous Throughput\" \u003e 0\n  order by\n    sub.\"Throughput\" desc\n) sub2\nlimit\n  200",
            "refId": "A",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "column"
                }
              ]
            ],
            "table": "shpr_comps",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "group": [],
            "metricColumn": "none",
            "rawQuery": true
          }
        ],
        "transform": "table",
        "fontSize": "80%",
        "gridPos": {
          "x": 0,
          "y": 18,
          "h": 13,
          "w": 24
        },
        "id": 8,
        "showHeader": true,
        "sort": {
          "desc": true,
          "col": 1
        }
      }
    ],
    "templating": {
      "list": [
        {
          "options": [],
          "tagValuesQuery": "",
          "tagsQuery": "",
          "type": "query",
          "definition": "select distinct repo_group from gha_repos where repo_group is not null order by 1",
          "label": "Repository  groups",
          "skipUrlSync": false,
          "sort": 0,
          "current": {
            "text": "All",
            "value": "$__all"
          },
          "datasource": "psql",
          "name": "repogroups",
          "query": "select distinct repo_group from gha_repos where repo_group is not null order by 1",
          "refresh": 1,
          "regex": "",
          "hide": 0,
          "includeAll": true,
          "tags": [],
          "useTags": false,
          "allValue": null,
          "multi": true
        },
        {
          "multi": true,
          "allValue": "null",
          "label": "Contributors",
          "refresh": 1,
          "regex": "",
          "sort": 0,
          "useTags": false,
          "current": {
            "text": "All",
            "value": "$__all"
          },
          "hide": 0,
          "query": "select sub.actor from (select e.dup_actor_login as actor, count(distinct e.id) as cnt from gha_events e, gha_repos r where $__timeFilter(e.created_at) and e.repo_id = r.id and e.dup_repo_name = r.name and r.repo_group in ($repogroups) and lower(dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%']) group by e.dup_actor_login order by cnt desc limit 200) sub",
          "tagValuesQuery": "",
          "tags": [],
          "tagsQuery": "",
          "datasource": "psql",
          "options": [],
          "name": "contributors",
          "skipUrlSync": false,
          "type": "query",
          "definition": "select sub.actor from (select e.dup_actor_login as actor, count(distinct e.id) as cnt from gha_events e, gha_repos r where $__timeFilter(e.created_at) and e.repo_id = r.id and e.dup_repo_name = r.name and r.repo_group in ($repogroups) and lower(dup_actor_login) not like all(array['devstats-sync', 'googlebot', 'coveralls', 'rktbot', 'coreosbot', 'web-flow', 'prometheus-roobot', 'cncf-bot', 'kernelprbot', 'istio-testing', 'spinnakerbot', 'pikbot', 'spinnaker-release', 'docker-jenkins', 'golangcibot', 'opencontrail-ci-admin', 'k8s-%', '%-bot', '%-robot', 'bot-%', 'robot-%', '%[bot]%', '%-jenkins', '%-ci%bot', '%-testing', 'codecov-%', '%clabot%', '%cla-bot%', '%-gerrit', '%-bot-%']) group by e.dup_actor_login order by cnt desc limit 200) sub",
          "includeAll": true
        }
      ]
    },
    "timezone": "",
    "version": 7,
    "uid": "63",
    "annotations": {
      "list": [
        {
          "name": "Annotations \u0026 Alerts",
          "type": "dashboard",
          "builtIn": 1,
          "datasource": "-- Grafana --",
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)"
        }
      ]
    },
    "gnetId": null,
    "id": 15,
    "refresh": "15m",
    "style": "dark",
    "schemaVersion": 18,
    "timepicker": {
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ],
      "hidden": true
    }
  }


slug: issues-age-by-repository-group
title: Issues Age by Repository Group
created: 2024-04-09 11:21:31.423810295+00:00
updated: 2024-04-09 11:21:31.423810365+00:00
uid: 11
data:
  {
    "style": "dark",
    "tags": [
      "dashboard",
      "cii"
    ],
    "templating": {
      "list": [
        {
          "current": {
            "text": "CII",
            "value": "CII"
          },
          "datasource": "psql",
          "includeAll": false,
          "name": "full_name",
          "options": [],
          "skipUrlSync": true,
          "type": "query",
          "definition": "",
          "hide": 2,
          "label": null,
          "multi": false,
          "sort": 0,
          "tags": [],
          "tagsQuery": "",
          "refresh": 1,
          "regex": "",
          "useTags": false,
          "allValue": null,
          "query": "select value_s from gha_vars where name = 'full_name'",
          "tagValuesQuery": ""
        },
        {
          "current": {
            "tags": [],
            "text": "7 Days MA",
            "value": "d7"
          },
          "multi": false,
          "options": [
            {
              "selected": false,
              "text": "Day",
              "value": "d"
            },
            {
              "selected": true,
              "text": "7 Days MA",
              "value": "d7"
            },
            {
              "selected": false,
              "text": "Week",
              "value": "w"
            },
            {
              "selected": false,
              "text": "Month",
              "value": "m"
            },
            {
              "selected": false,
              "text": "Quarter",
              "value": "q"
            },
            {
              "selected": false,
              "text": "Year",
              "value": "y"
            }
          ],
          "skipUrlSync": false,
          "name": "period",
          "query": "d,d7,w,m,q,y",
          "type": "custom",
          "allValue": null,
          "hide": 0,
          "includeAll": false,
          "label": "Period"
        },
        {
          "allValue": null,
          "current": {
            "tags": [],
            "text": "All",
            "value": "All"
          },
          "datasource": "psql",
          "regex": "",
          "sort": 0,
          "tagsQuery": "",
          "includeAll": false,
          "label": "Repository group",
          "multi": false,
          "options": [],
          "query": "select all_repo_group_name from tall_repo_groups order by 1",
          "refresh": 1,
          "tags": [],
          "hide": 0,
          "name": "repogroup_name",
          "tagValuesQuery": "",
          "useTags": false,
          "definition": "",
          "skipUrlSync": false,
          "type": "query"
        },
        {
          "allValue": null,
          "hide": 2,
          "name": "repogroup",
          "refresh": 1,
          "regex": "",
          "tags": [],
          "type": "query",
          "current": {
            "text": "all",
            "value": "all"
          },
          "definition": "",
          "includeAll": false,
          "options": [],
          "useTags": false,
          "tagsQuery": "",
          "query": "select all_repo_group_value from tall_repo_groups where all_repo_group_name = '[[repogroup_name]]'",
          "skipUrlSync": true,
          "sort": 0,
          "tagValuesQuery": "",
          "datasource": "psql",
          "label": "",
          "multi": false
        },
        {
          "regex": "",
          "skipUrlSync": false,
          "tagValuesQuery": "",
          "allValue": "",
          "name": "prio_name",
          "query": "select priority_labels_name_with_all from tpriority_labels_with_all order by 1",
          "sort": 0,
          "datasource": "psql",
          "label": "Priority",
          "refresh": 1,
          "tags": [],
          "hide": 0,
          "multi": false,
          "options": [],
          "tagsQuery": "",
          "type": "query",
          "useTags": false,
          "current": {
            "text": "All",
            "value": "All"
          },
          "definition": "",
          "includeAll": false
        },
        {
          "allValue": "",
          "label": "Priority",
          "refresh": 1,
          "tagValuesQuery": "",
          "datasource": "psql",
          "options": [],
          "query": "select priority_labels_value_with_all from tpriority_labels_with_all where priority_labels_name_with_all = '[[prio_name]]'",
          "regex": "",
          "sort": 0,
          "type": "query",
          "current": {
            "text": "all",
            "value": "all"
          },
          "hide": 2,
          "skipUrlSync": true,
          "tagsQuery": "",
          "useTags": false,
          "definition": "",
          "includeAll": false,
          "multi": false,
          "name": "prio",
          "tags": []
        },
        {
          "current": {
            "text": "\u003ch1 id=\"dashboard-header\"\u003eCII issues age dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/issues_age.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003eissues_age\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/cii/issues-age.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows median time to close issues opened in selected periods and average number of closed issues opened in those periods.\u003c/li\u003e\n\u003cli\u003eSelecting period (for example week) means that dashboard will calculate data for issues opened in those periods.\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary for all of them.\u003c/li\u003e\n\u003cli\u003eYou can select all issues or issues with a specific priority.\u003c/li\u003e\n\u003cli\u003eIssue priority is defined as a label \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/labels_priorities_tags_with_all.sql\" target=\"_blank\"\u003ehere\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003c/ul\u003e",
            "value": "\u003ch1 id=\"dashboard-header\"\u003eCII issues age dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/issues_age.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003eissues_age\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/cii/issues-age.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows median time to close issues opened in selected periods and average number of closed issues opened in those periods.\u003c/li\u003e\n\u003cli\u003eSelecting period (for example week) means that dashboard will calculate data for issues opened in those periods.\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary for all of them.\u003c/li\u003e\n\u003cli\u003eYou can select all issues or issues with a specific priority.\u003c/li\u003e\n\u003cli\u003eIssue priority is defined as a label \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/labels_priorities_tags_with_all.sql\" target=\"_blank\"\u003ehere\u003c/a\u003e.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003c/ul\u003e"
          },
          "definition": "",
          "hide": 2,
          "refresh": 1,
          "allValue": null,
          "label": null,
          "sort": 0,
          "tagsQuery": "",
          "useTags": false,
          "datasource": "psql",
          "tagValuesQuery": "",
          "type": "query",
          "query": "select value_s from gha_vars where name = 'issues_age_docs_html'",
          "multi": false,
          "name": "docs",
          "options": [],
          "regex": "",
          "skipUrlSync": true,
          "tags": [],
          "includeAll": false
        }
      ]
    },
    "time": {
      "from": "now-2y",
      "to": "now-1w"
    },
    "timepicker": {
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ]
    },
    "editable": true,
    "id": 17,
    "panels": [
      {
        "description": "Current median closing time for recent issues.",
        "postfixFontSize": "50%",
        "valueMaps": [
          {
            "op": "=",
            "text": "N/A",
            "value": "null"
          }
        ],
        "colors": [
          "rgba(245, 54, 54, 0.9)",
          "rgba(237, 129, 40, 0.89)",
          "rgba(50, 172, 45, 0.97)"
        ],
        "options": {
          
        },
        "postfix": "",
        "prefix": "",
        "valueFontSize": "50%",
        "id": 2,
        "interval": null,
        "nullText": null,
        "sparkline": {
          "show": false,
          "fillColor": "rgba(31, 118, 189, 0.18)",
          "full": false,
          "lineColor": "rgb(31, 120, 193)"
        },
        "mappingTypes": [
          {
            "value": 1,
            "name": "value to text"
          },
          {
            "name": "range to text",
            "value": 2
          }
        ],
        "tableColumn": "",
        "targets": [
          {
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                },
                {
                  "type": "mean",
                  "params": []
                }
              ]
            ],
            "groupBy": [
              {
                "params": [
                  "$__interval"
                ],
                "type": "time"
              },
              {
                "params": [
                  "null"
                ],
                "type": "fill"
              }
            ],
            "policy": "default",
            "rawQuery": true,
            "refId": "A",
            "query": "SELECT \"descr\" FROM \"autogen\".\"issues_age_[[repogroup]]_[[prio]]_median_[[period]]\" WHERE $timeFilter",
            "rawSql": "select\n  descr\nfrom\n  sissues_age\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'iage[[repogroup]][[prio]]m'\norder by\n  time desc\nlimit 1",
            "resultFormat": "time_series",
            "tags": [],
            "alias": "",
            "dsType": "influxdb",
            "format": "table",
            "orderByTime": "ASC"
          }
        ],
        "colorBackground": false,
        "links": [],
        "nullPointMode": "connected",
        "thresholds": "",
        "type": "singlestat",
        "valueName": "current",
        "datasource": "psql",
        "mappingType": 1,
        "prefixFontSize": "50%",
        "title": "Current median time to close for issues created last [[period]] for repository group [[repogroup_name]], Priority: [[prio_name]]",
        "cacheTimeout": null,
        "colorValue": false,
        "rangeMaps": [
          {
            "to": "null",
            "from": "null",
            "text": "N/A"
          }
        ],
        "format": "none",
        "gauge": {
          "maxValue": 100,
          "minValue": 0,
          "show": false,
          "thresholdLabels": false,
          "thresholdMarkers": true
        },
        "gridPos": {
          "h": 3,
          "w": 14,
          "x": 0,
          "y": 0
        },
        "maxDataPoints": 100
      },
      {
        "nullPointMode": "connected",
        "targets": [
          {
            "tags": [],
            "alias": "",
            "dsType": "influxdb",
            "orderByTime": "ASC",
            "policy": "default",
            "query": "SELECT \"value\" FROM \"autogen\".\"issues_age_[[repogroup]]_[[prio]]_number_[[period]]\" WHERE $timeFilter",
            "resultFormat": "time_series",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                },
                {
                  "type": "mean",
                  "params": []
                }
              ]
            ],
            "format": "time_series",
            "groupBy": [
              {
                "params": [
                  "$__interval"
                ],
                "type": "time"
              },
              {
                "params": [
                  "null"
                ],
                "type": "fill"
              }
            ],
            "rawQuery": true,
            "rawSql": "select\n  time, value\nfrom\n  sissues_age\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'iage[[repogroup]][[prio]]n'\norder by\n  time desc\nlimit 1",
            "refId": "A"
          }
        ],
        "colorValue": false,
        "colors": [
          "rgba(245, 54, 54, 0.9)",
          "rgba(237, 129, 40, 0.89)",
          "rgba(50, 172, 45, 0.97)"
        ],
        "description": "Number of closed issues opened recently",
        "interval": null,
        "thresholds": "",
        "gauge": {
          "maxValue": 100,
          "minValue": 0,
          "show": false,
          "thresholdLabels": false,
          "thresholdMarkers": true
        },
        "nullText": null,
        "type": "singlestat",
        "valueMaps": [
          {
            "op": "=",
            "text": "N/A",
            "value": "null"
          }
        ],
        "colorBackground": false,
        "format": "none",
        "postfix": "",
        "tableColumn": "",
        "valueFontSize": "50%",
        "id": 4,
        "links": [],
        "mappingType": 1,
        "title": "Number of closed issues opened last [[period]] for repository group [[repogroup_name]], Priority: [[prio_name]]",
        "sparkline": {
          "fillColor": "rgba(31, 118, 189, 0.18)",
          "full": false,
          "lineColor": "rgb(31, 120, 193)",
          "show": false
        },
        "prefix": "",
        "datasource": "psql",
        "gridPos": {
          "w": 10,
          "x": 14,
          "y": 0,
          "h": 3
        },
        "mappingTypes": [
          {
            "name": "value to text",
            "value": 1
          },
          {
            "name": "range to text",
            "value": 2
          }
        ],
        "maxDataPoints": 100,
        "options": {
          
        },
        "cacheTimeout": null,
        "postfixFontSize": "50%",
        "prefixFontSize": "50%",
        "rangeMaps": [
          {
            "from": "null",
            "text": "N/A",
            "to": "null"
          }
        ],
        "valueName": "current"
      },
      {
        "decimals": 2,
        "gridPos": {
          "h": 13,
          "w": 24,
          "x": 0,
          "y": 3
        },
        "percentage": false,
        "timeFrom": null,
        "id": 1,
        "thresholds": [],
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": [
            "total"
          ]
        },
        "targets": [
          {
            "policy": "autogen",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "tags": [],
            "alias": "",
            "dsType": "influxdb",
            "measurement": "reviewers_d",
            "hide": false,
            "format": "time_series",
            "query": "SELECT \"value\" FROM \"autogen\".\"issues_age_[[repogroup]]_[[prio]]_number_[[period]]\" WHERE $timeFilter",
            "rawSql": "select\n  time,\n  value as \"Average number of issues opened\"\nfrom\n  sissues_age\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'iage[[repogroup]][[prio]]n'\norder by\n  time",
            "refId": "A",
            "resultFormat": "time_series",
            "groupBy": [],
            "orderByTime": "ASC",
            "rawQuery": true
          },
          {
            "hide": false,
            "policy": "autogen",
            "rawQuery": true,
            "rawSql": "select\n  time,\n  value as \"Median time to close issue\"\nfrom\n  sissues_age\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'iage[[repogroup]][[prio]]m'\norder by\n  time",
            "refId": "B",
            "groupBy": [],
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "alias": "",
            "measurement": "reviewers_d",
            "orderByTime": "ASC",
            "resultFormat": "time_series",
            "tags": [],
            "dsType": "influxdb",
            "format": "time_series",
            "query": "SELECT \"value\" FROM \"autogen\".\"issues_age_[[repogroup]]_[[prio]]_median_[[period]]\" WHERE $timeFilter"
          }
        ],
        "description": "Median time to close and number of issues created in [[repogroup]] repository group.",
        "linewidth": 0,
        "options": {
          "dataLinks": []
        },
        "pointradius": 1,
        "stack": false,
        "steppedLine": false,
        "dashLength": 10,
        "links": [],
        "spaceLength": 10,
        "dashes": false,
        "fill": 3,
        "lines": false,
        "nullPointMode": "null",
        "renderer": "flot",
        "tooltip": {
          "shared": true,
          "sort": 0,
          "value_type": "individual"
        },
        "yaxes": [
          {
            "min": "0",
            "show": true,
            "decimals": null,
            "format": "h",
            "label": "Median issue close time",
            "logBase": 1,
            "max": null
          },
          {
            "format": "short",
            "label": "Average issues opened",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true,
            "decimals": null
          }
        ],
        "aliasColors": {
          
        },
        "bars": false,
        "legend": {
          "hideEmpty": false,
          "rightSide": false,
          "alignAsTable": false,
          "avg": true,
          "current": true,
          "hideZero": false,
          "max": true,
          "min": true,
          "show": true,
          "sideWidth": null,
          "total": false,
          "values": true
        },
        "points": false,
        "seriesOverrides": [
          {
            "fill": 2,
            "lines": true,
            "linewidth": 0,
            "yaxis": 1,
            "alias": "Median time to close issue"
          },
          {
            "fill": 0,
            "lines": true,
            "linewidth": 1,
            "yaxis": 2,
            "alias": "Average number of issues opened"
          }
        ],
        "title": "Number/Median time to close of Issues in [[repogroup_name]] repository group ([[period]]), Priority: [[prio_name]]",
        "datasource": "psql",
        "timeRegions": [],
        "timeShift": null,
        "type": "graph",
        "fillGradient": 0,
        "yaxis": {
          "align": false,
          "alignLevel": null
        }
      },
      {
        "transform": "table",
        "datasource": "psql",
        "description": "Median time to close and the number​ of issues created in [[repogroup]] repository group.",
        "fontSize": "90%",
        "gridPos": {
          "y": 16,
          "h": 11,
          "w": 24,
          "x": 0
        },
        "scroll": true,
        "showHeader": true,
        "columns": [],
        "links": [],
        "options": {
          
        },
        "pageSize": 10,
        "type": "table",
        "id": 3,
        "sort": {
          "desc": true,
          "col": 0
        },
        "targets": [
          {
            "policy": "default",
            "refId": "A",
            "resultFormat": "time_series",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                },
                {
                  "params": [],
                  "type": "mean"
                }
              ]
            ],
            "tags": [],
            "dsType": "influxdb",
            "orderByTime": "ASC",
            "groupBy": [
              {
                "type": "time",
                "params": [
                  "$__interval"
                ]
              },
              {
                "params": [
                  "null"
                ],
                "type": "fill"
              }
            ],
            "query": "SELECT \"descr\" FROM \"autogen\".\"issues_age_[[repogroup]]_[[prio]]_median_[[period]]\" WHERE $timeFilter",
            "rawQuery": true,
            "rawSql": "select\n  time as \"Time\",\n  descr as \"Median time to close issue\"\nfrom\n  sissues_age\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'iage[[repogroup]][[prio]]m'\norder by\n  time",
            "alias": "",
            "format": "table"
          },
          {
            "groupBy": [
              {
                "params": [
                  "$__interval"
                ],
                "type": "time"
              },
              {
                "params": [
                  "null"
                ],
                "type": "fill"
              }
            ],
            "orderByTime": "ASC",
            "policy": "default",
            "rawQuery": true,
            "refId": "B",
            "resultFormat": "time_series",
            "alias": "",
            "format": "table",
            "rawSql": "select\n  time as \"Time\",\n  value as \"Average number of issues opened\"\nfrom\n  sissues_age\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'iage[[repogroup]][[prio]]n'\norder by\n  time",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                },
                {
                  "params": [],
                  "type": "mean"
                }
              ]
            ],
            "tags": [],
            "dsType": "influxdb",
            "query": "SELECT \"value\" FROM \"autogen\".\"issues_age_[[repogroup]]_[[prio]]_number_[[period]]\" WHERE $timeFilter"
          }
        ],
        "styles": [
          {
            "type": "date",
            "alias": "Time",
            "dateFormat": "MM/DD/YYYY",
            "pattern": "Time"
          },
          {
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ],
            "decimals": 2,
            "pattern": "/.*/",
            "thresholds": [],
            "type": "number",
            "unit": "short",
            "alias": "",
            "colorMode": null
          }
        ],
        "title": "Number/Median time to close of Issues in [[repogroup_name]] repository group ([[period]]), Priority: [[prio_name]]"
      },
      {
        "gridPos": {
          "h": 11,
          "w": 24,
          "x": 0,
          "y": 27
        },
        "id": 11,
        "mode": "html",
        "content": "${docs:raw}",
        "datasource": null,
        "links": [],
        "options": {
          
        },
        "title": "Dashboard documentation",
        "type": "text"
      }
    ],
    "graphTooltip": 0,
    "refresh": false,
    "timezone": "",
    "uid": "11",
    "annotations": {
      "list": [
        {
          "tagsColumn": "title,description",
          "type": "alert",
          "hide": false,
          "limit": 100,
          "name": "Releases",
          "rawQuery": "select extract(epoch from time) AS time, title as text, description as tags from sannotations where $__timeFilter(time)",
          "showIn": 0,
          "textColumn": "",
          "titleColumn": "[[full_name]] release",
          "datasource": "psql",
          "enable": true,
          "iconColor": "rgba(255, 96, 96, 1)",
          "query": "SELECT title, description from annotations WHERE $timeFilter order by time asc"
        },
        {
          "datasource": "-- Grafana --",
          "limit": 100,
          "name": "Annotations \u0026 Alerts",
          "showIn": 0,
          "type": "dashboard",
          "builtIn": 1,
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)"
        }
      ]
    },
    "links": [],
    "title": "Issues Age by Repository Group",
    "version": 2,
    "gnetId": null,
    "iteration": 1571375127782,
    "schemaVersion": 20
  }


slug: issues-opened-closed-by-repository-group
title: Issues Opened/Closed by Repository Group
created: 2024-04-09 11:21:31.429374877+00:00
updated: 2024-04-09 11:21:31.429375047+00:00
uid: 12
data:
  {
    "gnetId": null,
    "id": 15,
    "refresh": false,
    "uid": "12",
    "version": 4,
    "panels": [
      {
        "renderer": "flot",
        "datasource": "psql",
        "decimals": 2,
        "fill": 1,
        "gridPos": {
          "h": 9,
          "w": 24,
          "x": 0,
          "y": 0
        },
        "lines": false,
        "options": {
          "dataLinks": []
        },
        "pointradius": 5,
        "xaxis": {
          "values": [
            "total"
          ],
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true
        },
        "yaxis": {
          "alignLevel": null,
          "align": false
        },
        "aliasColors": {
          
        },
        "linewidth": 1,
        "steppedLine": false,
        "tooltip": {
          "shared": true,
          "sort": 2,
          "value_type": "individual"
        },
        "transparent": true,
        "legend": {
          "avg": true,
          "current": true,
          "min": true,
          "rightSide": false,
          "sort": "avg",
          "total": true,
          "alignAsTable": true,
          "hideZero": false,
          "max": true,
          "show": true,
          "sortDesc": true,
          "values": true,
          "hideEmpty": false
        },
        "timeRegions": [],
        "nullPointMode": "null as zero",
        "type": "graph",
        "bars": true,
        "dashes": false,
        "description": "Show Issues opened/closed for given repository group",
        "fillGradient": 0,
        "seriesOverrides": [],
        "thresholds": [],
        "timeShift": null,
        "dashLength": 10,
        "points": false,
        "spaceLength": 10,
        "timeFrom": null,
        "yaxes": [
          {
            "label": "Issues",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true,
            "format": "short"
          },
          {
            "format": "short",
            "label": "",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true
          }
        ],
        "percentage": false,
        "targets": [
          {
            "measurement": "sig_federation_d",
            "rawSql": "select\n  time,\n  \"[[repogroup]]\" as \"Issues opened\"\nfrom\n  siopened\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "format": "time_series",
            "rawQuery": true,
            "refId": "A",
            "tags": [],
            "groupBy": [],
            "dsType": "influxdb",
            "orderByTime": "ASC",
            "policy": "default",
            "query": "SELECT /^[[repogroup]]$/ FROM \"issues_opened_[[period]]\" WHERE $timeFilter",
            "resultFormat": "time_series",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "alias": ""
          },
          {
            "policy": "default",
            "query": "SELECT /^[[repogroup]]$/ FROM \"issues_closed_[[period]]\" WHERE $timeFilter",
            "dsType": "influxdb",
            "orderByTime": "ASC",
            "tags": [],
            "alias": "",
            "rawQuery": true,
            "resultFormat": "time_series",
            "format": "time_series",
            "groupBy": [],
            "measurement": "sig_federation_d",
            "rawSql": "select\n  time,\n  \"[[repogroup]]\" as \"Issues closed\"\nfrom\n  siclosed\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "refId": "B",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ]
          }
        ],
        "id": 3,
        "links": [],
        "stack": true,
        "title": "Issues Repository group: [[repogroup_name]] ([[period]])"
      },
      {
        "fill": 1,
        "thresholds": [],
        "options": {
          "dataLinks": []
        },
        "percentage": false,
        "fillGradient": 0,
        "title": "PRs Repository group: [[repogroup_name]] ([[period]])",
        "yaxes": [
          {
            "max": null,
            "min": "0",
            "show": true,
            "format": "short",
            "label": "PRs",
            "logBase": 1
          },
          {
            "format": "short",
            "label": "",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true
          }
        ],
        "datasource": "psql",
        "decimals": 2,
        "legend": {
          "avg": true,
          "current": true,
          "max": true,
          "min": true,
          "rightSide": false,
          "show": true,
          "sort": "avg",
          "values": true,
          "alignAsTable": true,
          "hideEmpty": false,
          "hideZero": false,
          "sortDesc": true,
          "total": true
        },
        "linewidth": 1,
        "renderer": "flot",
        "targets": [
          {
            "groupBy": [],
            "orderByTime": "ASC",
            "rawQuery": true,
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "format": "time_series",
            "metricColumn": "none",
            "policy": "default",
            "resultFormat": "time_series",
            "group": [],
            "measurement": "sig_federation_d",
            "query": "SELECT /^[[repogroup]]$/ FROM \"issues_opened_[[period]]\" WHERE $timeFilter",
            "rawSql": "select\n  time,\n  \"[[repogroup]]\" as \"PRs opened\"\nfrom\n  spropened\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "refId": "A",
            "select": [
              [
                {
                  "type": "field",
                  "params": [
                    "value"
                  ]
                }
              ]
            ],
            "tags": [],
            "alias": "",
            "timeColumn": "time",
            "dsType": "influxdb"
          },
          {
            "query": "SELECT /^[[repogroup]]$/ FROM \"issues_closed_[[period]]\" WHERE $timeFilter",
            "rawQuery": true,
            "dsType": "influxdb",
            "metricColumn": "none",
            "refId": "B",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "timeColumn": "time",
            "format": "time_series",
            "groupBy": [],
            "measurement": "sig_federation_d",
            "orderByTime": "ASC",
            "policy": "default",
            "rawSql": "select\n  time,\n  \"[[repogroup]]\" as \"PRs closed\"\nfrom\n  sprclosed\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "resultFormat": "time_series",
            "tags": [],
            "alias": "",
            "group": [],
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ]
          }
        ],
        "type": "graph",
        "bars": true,
        "description": "Show PRs opened/closed for given repository group",
        "links": [],
        "seriesOverrides": [],
        "stack": true,
        "timeRegions": [],
        "timeShift": null,
        "dashLength": 10,
        "pointradius": 5,
        "timeFrom": null,
        "xaxis": {
          "show": true,
          "values": [
            "total"
          ],
          "buckets": null,
          "mode": "time",
          "name": null
        },
        "nullPointMode": "null as zero",
        "spaceLength": 10,
        "tooltip": {
          "shared": true,
          "sort": 2,
          "value_type": "individual"
        },
        "transparent": true,
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "aliasColors": {
          
        },
        "dashes": false,
        "gridPos": {
          "h": 9,
          "w": 24,
          "x": 0,
          "y": 9
        },
        "id": 13,
        "lines": false,
        "points": false,
        "steppedLine": false
      },
      {
        "dashes": false,
        "gridPos": {
          "h": 9,
          "w": 24,
          "x": 0,
          "y": 18
        },
        "linewidth": 1,
        "type": "graph",
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "aliasColors": {
          
        },
        "fill": 0,
        "percentage": false,
        "timeShift": null,
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": [
            "total"
          ]
        },
        "datasource": "psql",
        "id": 12,
        "transparent": true,
        "decimals": 2,
        "description": "Show Issues opened/closed for given repository group",
        "fillGradient": 0,
        "seriesOverrides": [],
        "timeFrom": null,
        "tooltip": {
          "shared": true,
          "sort": 2,
          "value_type": "individual"
        },
        "pointradius": 5,
        "spaceLength": 10,
        "stack": false,
        "timeRegions": [],
        "links": [],
        "points": false,
        "title": "Issues Repository group: [[repogroup_name]] ([[period]])",
        "dashLength": 10,
        "options": {
          "dataLinks": []
        },
        "renderer": "flot",
        "bars": false,
        "legend": {
          "show": true,
          "sortDesc": true,
          "total": true,
          "current": true,
          "hideEmpty": false,
          "hideZero": false,
          "min": true,
          "rightSide": false,
          "alignAsTable": true,
          "avg": true,
          "max": true,
          "sort": "avg",
          "values": true
        },
        "lines": true,
        "nullPointMode": "null as zero",
        "steppedLine": false,
        "targets": [
          {
            "dsType": "influxdb",
            "rawSql": "select\n  time,\n  \"[[repogroup]]\" as \"Issues opened\"\nfrom\n  siopened\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "rawQuery": true,
            "resultFormat": "time_series",
            "timeColumn": "time",
            "alias": "",
            "format": "time_series",
            "metricColumn": "none",
            "orderByTime": "ASC",
            "group": [],
            "groupBy": [],
            "policy": "default",
            "refId": "A",
            "measurement": "sig_federation_d",
            "query": "SELECT /^[[repogroup]]$/ FROM \"issues_opened_[[period]]\" WHERE $timeFilter",
            "tags": [],
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ]
          },
          {
            "refId": "B",
            "dsType": "influxdb",
            "format": "time_series",
            "policy": "default",
            "rawSql": "select\n  time,\n  \"[[repogroup]]\" as \"Issues closed\"\nfrom\n  siclosed\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "timeColumn": "time",
            "where": [
              {
                "type": "macro",
                "name": "$__timeFilter",
                "params": []
              }
            ],
            "alias": "",
            "groupBy": [],
            "measurement": "sig_federation_d",
            "orderByTime": "ASC",
            "rawQuery": true,
            "tags": [],
            "group": [],
            "metricColumn": "none",
            "query": "SELECT /^[[repogroup]]$/ FROM \"issues_closed_[[period]]\" WHERE $timeFilter",
            "resultFormat": "time_series",
            "select": [
              [
                {
                  "type": "field",
                  "params": [
                    "value"
                  ]
                }
              ]
            ]
          }
        ],
        "thresholds": [],
        "yaxes": [
          {
            "max": null,
            "min": "0",
            "show": true,
            "format": "short",
            "label": "Issues",
            "logBase": 1
          },
          {
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true,
            "format": "short",
            "label": ""
          }
        ]
      },
      {
        "timeFrom": null,
        "tooltip": {
          "sort": 2,
          "value_type": "individual",
          "shared": true
        },
        "xaxis": {
          "name": null,
          "show": true,
          "values": [
            "total"
          ],
          "buckets": null,
          "mode": "time"
        },
        "id": 14,
        "spaceLength": 10,
        "seriesOverrides": [],
        "transparent": true,
        "yaxis": {
          "align": false,
          "alignLevel": null
        },
        "aliasColors": {
          
        },
        "percentage": false,
        "nullPointMode": "null as zero",
        "points": false,
        "stack": false,
        "type": "graph",
        "yaxes": [
          {
            "format": "short",
            "label": "PRs",
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true
          },
          {
            "logBase": 1,
            "max": null,
            "min": "0",
            "show": true,
            "format": "short",
            "label": ""
          }
        ],
        "dashLength": 10,
        "decimals": 2,
        "steppedLine": false,
        "thresholds": [],
        "description": "Show PRs opened/closed for given repository group",
        "links": [],
        "legend": {
          "total": true,
          "values": true,
          "current": true,
          "hideEmpty": false,
          "hideZero": false,
          "max": true,
          "min": true,
          "show": true,
          "alignAsTable": true,
          "avg": true,
          "rightSide": false,
          "sort": "avg",
          "sortDesc": true
        },
        "lines": true,
        "linewidth": 1,
        "targets": [
          {
            "query": "SELECT /^[[repogroup]]$/ FROM \"issues_opened_[[period]]\" WHERE $timeFilter",
            "rawQuery": true,
            "timeColumn": "time",
            "alias": "",
            "groupBy": [],
            "measurement": "sig_federation_d",
            "orderByTime": "ASC",
            "rawSql": "select\n  time,\n  \"[[repogroup]]\" as \"PRs opened\"\nfrom\n  spropened\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "metricColumn": "none",
            "select": [
              [
                {
                  "params": [
                    "value"
                  ],
                  "type": "field"
                }
              ]
            ],
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "policy": "default",
            "refId": "A",
            "resultFormat": "time_series",
            "tags": [],
            "dsType": "influxdb",
            "format": "time_series",
            "group": []
          },
          {
            "refId": "B",
            "resultFormat": "time_series",
            "tags": [],
            "alias": "",
            "groupBy": [],
            "metricColumn": "none",
            "query": "SELECT /^[[repogroup]]$/ FROM \"issues_closed_[[period]]\" WHERE $timeFilter",
            "dsType": "influxdb",
            "format": "time_series",
            "orderByTime": "ASC",
            "group": [],
            "measurement": "sig_federation_d",
            "timeColumn": "time",
            "where": [
              {
                "name": "$__timeFilter",
                "params": [],
                "type": "macro"
              }
            ],
            "policy": "default",
            "rawQuery": true,
            "rawSql": "select\n  time,\n  \"[[repogroup]]\" as \"PRs closed\"\nfrom\n  sprclosed\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\norder by\n  time",
            "select": [
              [
                {
                  "type": "field",
                  "params": [
                    "value"
                  ]
                }
              ]
            ]
          }
        ],
        "title": "PRs Repository group: [[repogroup_name]] ([[period]])",
        "dashes": false,
        "datasource": "psql",
        "fillGradient": 0,
        "pointradius": 5,
        "timeShift": null,
        "bars": false,
        "fill": 0,
        "renderer": "flot",
        "timeRegions": [],
        "gridPos": {
          "h": 9,
          "w": 24,
          "x": 0,
          "y": 27
        },
        "options": {
          "dataLinks": []
        }
      },
      {
        "links": [],
        "mode": "html",
        "options": {
          
        },
        "title": "Dashboard documentation",
        "type": "text",
        "content": "${docs:raw}",
        "gridPos": {
          "w": 24,
          "x": 0,
          "y": 36,
          "h": 11
        },
        "id": 11
      }
    ],
    "timezone": "",
    "annotations": {
      "list": [
        {
          "type": "dashboard",
          "builtIn": 1,
          "datasource": "-- Grafana --",
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations \u0026 Alerts"
        },
        {
          "limit": 100,
          "query": "SELECT title, description from annotations WHERE $timeFilter order by time asc",
          "rawQuery": "select extract(epoch from time) AS time, title as text, description as tags from sannotations where $__timeFilter(time)",
          "type": "alert",
          "datasource": "psql",
          "enable": true,
          "hide": false,
          "tagsColumn": "title,description",
          "textColumn": "",
          "titleColumn": "[[full_name]] release",
          "iconColor": "rgba(255, 96, 96, 1)",
          "name": "Releases",
          "showIn": 0
        }
      ]
    },
    "graphTooltip": 0,
    "iteration": 1567416900696,
    "links": [],
    "time": {
      "from": "now-1y",
      "to": "now"
    },
    "timepicker": {
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ]
    },
    "editable": true,
    "schemaVersion": 19,
    "style": "dark",
    "tags": [
      "dashboard",
      "cii"
    ],
    "templating": {
      "list": [
        {
          "current": {
            "text": "Istio",
            "value": "Istio"
          },
          "multi": false,
          "query": "select value_s from gha_vars where name = 'full_name'",
          "skipUrlSync": true,
          "tagValuesQuery": "",
          "tags": [],
          "definition": "",
          "hide": 2,
          "label": null,
          "refresh": 1,
          "regex": "",
          "useTags": false,
          "allValue": null,
          "includeAll": false,
          "sort": 0,
          "type": "query",
          "datasource": "psql",
          "name": "full_name",
          "options": [],
          "tagsQuery": ""
        },
        {
          "hide": 0,
          "label": "Period",
          "multi": false,
          "name": "period",
          "type": "custom",
          "allValue": null,
          "current": {
            "value": "d7",
            "tags": [],
            "text": "7 Days MA"
          },
          "query": "d,w,m,q,y",
          "skipUrlSync": false,
          "includeAll": false,
          "options": [
            {
              "value": "d",
              "selected": false,
              "text": "Day"
            },
            {
              "selected": true,
              "text": "7 Days MA",
              "value": "d7"
            },
            {
              "text": "Week",
              "value": "w",
              "selected": false
            },
            {
              "value": "m",
              "selected": false,
              "text": "Month"
            },
            {
              "selected": false,
              "text": "Quarter",
              "value": "q"
            },
            {
              "text": "Year",
              "value": "y",
              "selected": false
            }
          ]
        },
        {
          "definition": "",
          "name": "repogroup_name",
          "options": [],
          "query": "select all_repo_group_name from tall_repo_groups order by 1",
          "refresh": 1,
          "tagValuesQuery": "",
          "type": "query",
          "current": {
            "text": "All",
            "value": "All"
          },
          "hide": 0,
          "multi": false,
          "skipUrlSync": false,
          "tagsQuery": "",
          "useTags": false,
          "datasource": "psql",
          "regex": "",
          "includeAll": false,
          "label": "Repository group",
          "sort": 0,
          "tags": [],
          "allValue": ""
        },
        {
          "options": [],
          "tagValuesQuery": "",
          "current": {
            "text": "all",
            "value": "all"
          },
          "multi": false,
          "name": "repogroup",
          "refresh": 1,
          "type": "query",
          "useTags": false,
          "includeAll": false,
          "definition": "",
          "regex": "",
          "tags": [],
          "datasource": "psql",
          "hide": 2,
          "label": "",
          "query": "select all_repo_group_value from tall_repo_groups where all_repo_group_name = '[[repogroup_name]]'",
          "skipUrlSync": true,
          "sort": 0,
          "tagsQuery": "",
          "allValue": ""
        },
        {
          "regex": "",
          "tagValuesQuery": "",
          "type": "query",
          "useTags": false,
          "hide": 2,
          "includeAll": false,
          "multi": false,
          "options": [],
          "skipUrlSync": true,
          "sort": 0,
          "allValue": null,
          "current": {
            "text": "\u003ch1 id=\"dashboard-header\"\u003eIstio issues repository group dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/issues_opened.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e (issues opened).\u003c/li\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/issues_closed.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e (issues closed).\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003eIssues repository group\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/istio/issues-repository-group.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows the number of issues opened and closed in a given periods.\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary for all of them.\u003c/li\u003e\n\u003cli\u003eSelecting period (for example week) means that dashboard will show data in those periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003c/ul\u003e",
            "value": "\u003ch1 id=\"dashboard-header\"\u003eIstio issues repository group dashboard\u003c/h1\u003e\n\u003cp\u003eLinks:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/issues_opened.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e (issues opened).\u003c/li\u003e\n\u003cli\u003eMetric \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/issues_closed.sql\" target=\"_blank\"\u003eSQL file\u003c/a\u003e (issues closed).\u003c/li\u003e\n\u003cli\u003eTSDB \u003ca href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\"\u003eseries definition\u003c/a\u003e. Search for \u003ccode\u003eIssues repository group\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eGrafana dashboard \u003ca href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/istio/issues-repository-group.json\" target=\"_blank\"\u003eJSON\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1 id=\"description\"\u003eDescription\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003eThis dashboard shows the number of issues opened and closed in a given periods.\u003c/li\u003e\n\u003cli\u003eYou can select single repository group or summary for all of them.\u003c/li\u003e\n\u003cli\u003eSelecting period (for example week) means that dashboard will show data in those periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about periods.\u003c/li\u003e\n\u003cli\u003eSee \u003ca href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\"\u003ehere\u003c/a\u003e for more informations about repository groups.\u003c/li\u003e\n\u003c/ul\u003e"
          },
          "datasource": "psql",
          "tags": [],
          "definition": "",
          "label": null,
          "name": "docs",
          "query": "select value_s from gha_vars where name = 'issues_docs_html'",
          "refresh": 1,
          "tagsQuery": ""
        }
      ]
    },
    "title": "Issues Opened/Closed by Repository Group"
  }


