-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAI-13039] - Add AI Copilot Evaluation dashboards and mock data (#372)
* add metric value endpoint * add metric definition endpoint * tag endpoint * metric value tag endpoint * user tool endpoint * add hasura functions and mock data test writes * giant user tool usage * shrink to essential usage params with mock data test * comment * tags and metric defs * add metric values with tags * fix user tool endpoint metric definition * add value type * add deletes and fixes * user tool usage * reorder deletes * coordiante tool usage with metrics * add copilot dashboard * copilot metrics and lines of code by team * more charts * more charts and filters * include current month * add copilot impact dashboard * add pr size info * fix pr size chart * rename dashboards * layout * add survey endpoints * add delete survey endpoints * add post/delete survey functions, call delete functions * fix names * fix endpoints * first survey data * add cadence survey questions * add pr questions and refactor writeQuestions * fix survey uid and association * add surveys dashboard * add copilot tasks chart and move dashboard folder * time savings * tasks and activity charts * align filters * fix space * fix sql charts, add summary numbers, fix layout * small updates * newlines * fix import * lint * lint * pr size to 2 bars * only 2 tool users out of 3
- Loading branch information
Showing
26 changed files
with
7,133 additions
and
3 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
init/resources/hasura/endpoints/delete_faros_metric_definition.gql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
init/resources/hasura/endpoints/delete_faros_metric_value.gql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
init/resources/hasura/endpoints/delete_faros_metric_value_tag.gql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
init/resources/hasura/endpoints/delete_survey_question_response.gql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
init/resources/hasura/endpoints/delete_survey_survey_question_association.gql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
init/resources/hasura/endpoints/delete_vcs_user_tool_usage.gql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
24
init/resources/hasura/endpoints/faros_metric_definition.gql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
34
init/resources/hasura/endpoints/faros_metric_value_tag.gql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
47
init/resources/hasura/endpoints/survey_question_response.gql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
init/resources/hasura/endpoints/survey_survey_question_association.gql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.