Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FAI-13039] - Add AI Copilot Evaluation dashboards and mock data #372

Merged
merged 50 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
4641ac8
add metric value endpoint
crupley Oct 23, 2024
9c95172
add metric definition endpoint
crupley Oct 23, 2024
2b12d05
tag endpoint
crupley Oct 23, 2024
05015b4
metric value tag endpoint
crupley Oct 23, 2024
3c87657
user tool endpoint
crupley Oct 23, 2024
fb27963
add hasura functions and mock data test writes
crupley Oct 23, 2024
7309669
giant user tool usage
crupley Oct 23, 2024
b1b90d1
shrink to essential usage params with mock data test
crupley Oct 23, 2024
fffebd8
comment
crupley Oct 23, 2024
693c6ac
tags and metric defs
crupley Oct 23, 2024
fd64126
add metric values with tags
crupley Oct 24, 2024
a703847
fix user tool endpoint metric definition
crupley Oct 24, 2024
f9595de
add value type
crupley Oct 24, 2024
d781495
add deletes and fixes
crupley Oct 24, 2024
d272f19
user tool usage
crupley Oct 24, 2024
e78d0e3
reorder deletes
crupley Oct 24, 2024
df8b215
coordiante tool usage with metrics
crupley Oct 30, 2024
225380c
add copilot dashboard
crupley Oct 30, 2024
5eab84d
copilot metrics and lines of code by team
crupley Oct 30, 2024
0033d5f
more charts
crupley Oct 30, 2024
9301c4f
more charts and filters
crupley Oct 30, 2024
57d7ea8
include current month
crupley Oct 30, 2024
6c8b535
add copilot impact dashboard
crupley Oct 31, 2024
2d9eb17
add pr size info
crupley Oct 31, 2024
966ead8
fix pr size chart
crupley Oct 31, 2024
b859f3d
rename dashboards
crupley Oct 31, 2024
4f04a33
layout
crupley Nov 4, 2024
6af8a58
add survey endpoints
crupley Nov 4, 2024
bc0fcfe
add delete survey endpoints
crupley Nov 4, 2024
e400c60
add post/delete survey functions, call delete functions
crupley Nov 4, 2024
ae1d6b1
fix names
crupley Nov 4, 2024
e73817d
fix endpoints
crupley Nov 5, 2024
0e919e1
first survey data
crupley Nov 5, 2024
b106dd0
add cadence survey questions
crupley Nov 5, 2024
687103c
add pr questions and refactor writeQuestions
crupley Nov 5, 2024
15393be
fix survey uid and association
crupley Nov 6, 2024
bab5f4d
add surveys dashboard
crupley Nov 6, 2024
045feb9
add copilot tasks chart and move dashboard folder
crupley Nov 6, 2024
51802af
time savings
crupley Nov 6, 2024
e04273a
tasks and activity charts
crupley Nov 7, 2024
e3318e5
align filters
crupley Nov 7, 2024
875ce66
fix space
crupley Nov 7, 2024
1e89825
fix sql charts, add summary numbers, fix layout
crupley Nov 7, 2024
ba984d3
small updates
crupley Nov 7, 2024
a7b1eb4
newlines
crupley Nov 7, 2024
a34a05b
fix import
crupley Nov 7, 2024
7105ea5
lint
crupley Nov 7, 2024
4596cca
lint
crupley Nov 7, 2024
29e850f
pr size to 2 bars
crupley Nov 12, 2024
b0379fd
only 2 tool users out of 3
crupley Nov 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mutation delete_faros_metric_definition($data_origin: String) {
delete_faros_MetricDefinition(where: { origin: { _eq: $data_origin } }) {
affected_rows
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mutation delete_faros_metric_value($data_origin: String) {
delete_faros_MetricValue(where: { origin: { _eq: $data_origin } }) {
affected_rows
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mutation delete_faros_metric_value_tag($data_origin: String) {
delete_faros_MetricValueTag(where: { origin: { _eq: $data_origin } }) {
affected_rows
}
}
5 changes: 5 additions & 0 deletions init/resources/hasura/endpoints/delete_faros_tag.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mutation delete_faros_tag($data_origin: String) {
delete_faros_Tag(where: { origin: { _eq: $data_origin } }) {
affected_rows
}
}
5 changes: 5 additions & 0 deletions init/resources/hasura/endpoints/delete_survey_question.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mutation delete_survey_question($data_origin: String) {
delete_survey_Question(where: { origin: { _eq: $data_origin } }) {
affected_rows
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mutation delete_survey_question_response($data_origin: String) {
delete_survey_QuestionResponse(where: { origin: { _eq: $data_origin } }) {
affected_rows
}
}
5 changes: 5 additions & 0 deletions init/resources/hasura/endpoints/delete_survey_survey.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mutation delete_survey_survey($data_origin: String) {
delete_survey_Survey(where: { origin: { _eq: $data_origin } }) {
affected_rows
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mutation delete_survey_survey_question_association($data_origin: String) {
delete_survey_SurveyQuestionAssociation(where: { origin: { _eq: $data_origin } }) {
affected_rows
}
}
5 changes: 5 additions & 0 deletions init/resources/hasura/endpoints/delete_vcs_user_tool.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mutation delete_vcs_user_tool($data_origin: String) {
delete_vcs_UserTool(where: { origin: { _eq: $data_origin } }) {
affected_rows
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mutation delete_vcs_user_tool_usage($data_origin: String) {
delete_vcs_UserToolUsage(where: { origin: { _eq: $data_origin } }) {
affected_rows
}
}
24 changes: 24 additions & 0 deletions init/resources/hasura/endpoints/faros_metric_definition.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
mutation insert_faros_metric_definition(
$data_uid: String!
$data_name: String!
$data_value_type: jsonb
$data_origin: String
) {
insert_faros_MetricDefinition_one(
object: {
uid: $data_uid
name: $data_name
valueType: $data_value_type
origin: $data_origin
}
on_conflict: {
constraint: faros_MetricDefinition_pkey
update_columns: [
origin
refreshedAt
]
}
) {
id
}
}
34 changes: 34 additions & 0 deletions init/resources/hasura/endpoints/faros_metric_value.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
mutation insert_faros_metric_value(
$data_uid: String!
$data_computedAt: timestamptz!
$data_value: String!
$data_definition: String!
$data_origin: String
) {
insert_faros_MetricValue_one(
object: {
uid: $data_uid
computedAt: $data_computedAt
value: $data_value
faros_MetricDefinition: {
data: {
uid: $data_definition
}
on_conflict: {constraint: faros_MetricDefinition_pkey, update_columns:refreshedAt}
}
origin: $data_origin
}
on_conflict: {
constraint: faros_MetricValue_pkey
update_columns: [
computedAt
value
definition
origin
refreshedAt
]
}
) {
id
}
}
34 changes: 34 additions & 0 deletions init/resources/hasura/endpoints/faros_metric_value_tag.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
mutation insert_faros_metric_value_tag(
$data_value_uid: String!
$data_value_definition_uid: String!
$data_tag_id: String!
$data_origin: String
) {
insert_faros_MetricValueTag_one(
object: {
faros_Tag: {
data: {
uid: $data_tag_id
}
on_conflict: {constraint: faros_Tag_pkey, update_columns: refreshedAt}
}
faros_MetricValue: {
data: {
uid: $data_value_uid
definition: $data_value_definition_uid
}
on_conflict: {constraint: faros_MetricValue_pkey, update_columns: refreshedAt}
}
origin: $data_origin
}
on_conflict: {
constraint: faros_MetricValueTag_pkey
update_columns: [
origin
refreshedAt
]
}
) {
id
}
}
26 changes: 26 additions & 0 deletions init/resources/hasura/endpoints/faros_tag.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
mutation insert_faros_tag(
$data_uid: String!
$data_key: String!
$data_value: String!
$data_origin: String
) {
insert_faros_Tag_one(
object: {
uid: $data_uid
key: $data_key
value: $data_value
origin: $data_origin
}
on_conflict: {
constraint: faros_Tag_pkey
update_columns: [
key
value
origin
refreshedAt
]
}
) {
id
}
}
39 changes: 39 additions & 0 deletions init/resources/hasura/endpoints/survey_question.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
mutation insert_survey_question(
$data_uid: String!
$data_question: String
$data_response_category: String
$data_response_detail: String
$data_question_category: String
$data_question_detail: String
$data_source: String!
$data_origin: String!
) {
insert_survey_Question_one(
object: {
uid: $data_uid
question: $data_question
responseType: {
category: $data_response_category
detail: $data_response_detail
}
questionCategory: {
category: $data_question_category
detail: $data_question_detail
}
source: $data_source
origin: $data_origin
}
on_conflict: {
constraint: survey_Question_pkey
update_columns: [
question
responseType
questionCategory
origin
refreshedAt
]
}
) {
id
}
}
47 changes: 47 additions & 0 deletions init/resources/hasura/endpoints/survey_question_response.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
mutation insert_survey_question_response(
$data_uid: String!
$data_origin: String!
$data_submitted_at: timestamptz
$data_response: String
$data_survey_uid: String
$data_survey_source: String
$data_question_uid: String
$data_question_source:String
) {
insert_survey_QuestionResponse_one(
object: {
uid: $data_uid
submittedAt: $data_submitted_at
response: $data_response
survey_SurveyQuestionAssociation: {
data: {
survey_Survey: {
data: {
uid: $data_survey_uid
source: $data_survey_source
}
on_conflict: {constraint: survey_Survey_pkey, update_columns: refreshedAt}
}
survey_Question: {
data: {
uid: $data_question_uid
source: $data_question_source
}
on_conflict: {constraint: survey_Question_pkey, update_columns: refreshedAt}
}
}
on_conflict: {constraint: survey_SurveyQuestionAssociation_pkey, update_columns: refreshedAt}
}
origin: $data_origin
}
on_conflict: {
constraint: survey_QuestionResponse_pkey
update_columns: [
origin
refreshedAt
]
}
) {
id
}
}
32 changes: 32 additions & 0 deletions init/resources/hasura/endpoints/survey_survey.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
mutation insert_survey_survey(
$data_uid: String!
$data_name: String
$data_type_category: String
$data_type_detail: String
$data_source: String!
$data_origin: String
) {
insert_survey_Survey_one(
object: {
uid: $data_uid
name: $data_name
type: {
category: $data_type_category
detail: $data_type_detail
}
source: $data_source
origin: $data_origin
}
on_conflict: {
constraint: survey_Survey_pkey
update_columns: [
name
type
origin
refreshedAt
]
}
) {
id
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
mutation insert_survey_question(
$data_survey_uid: String!
$data_survey_source: String!
$data_question_uid: String!
$data_question_source: String!
$data_origin: String!
) {
insert_survey_SurveyQuestionAssociation_one(
object: {
survey_Survey: {
data: {
uid: $data_survey_uid
source: $data_survey_source
}
on_conflict: {constraint: survey_Survey_pkey, update_columns: refreshedAt}
}
survey_Question: {
data: {
uid: $data_question_uid
source: $data_question_source
}
on_conflict: {constraint: survey_Question_pkey, update_columns: refreshedAt}
}
origin: $data_origin
}
on_conflict: {
constraint: survey_SurveyQuestionAssociation_pkey
update_columns: [
origin
refreshedAt
]
}
) {
id
}
}
6 changes: 6 additions & 0 deletions init/resources/hasura/endpoints/vcs_pull_request.gql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ mutation insert_vcs_pull_request(
$data_merge_commit_sha: String!
$data_pull_request_create_time: timestamptz!
$data_pull_request_merge_time: timestamptz!
$data_pull_request_lines_added: Int
$data_pull_request_lines_deleted: Int
$data_pull_request_repository: String!
$data_pull_request_organization: String!
$data_pull_request_source: String!
Expand All @@ -16,6 +18,10 @@ mutation insert_vcs_pull_request(
state: $data_pull_request_state
createdAt: $data_pull_request_create_time
mergedAt: $data_pull_request_merge_time
diffStats: {
linesAdded: $data_pull_request_lines_added
linesDeleted: $data_pull_request_lines_deleted
}
vcs_User: {
data: {
uid: $data_pull_request_author
Expand Down
Loading
Loading