Commit e3cb76b0 authored by SHAWNA MONERO's avatar SHAWNA MONERO
Browse files

Merge branch 'main' of github.com:lyft/clutch into main

parents 8ffc74eb 58821185
Showing with 97 additions and 138 deletions
+97 -138
......@@ -93,29 +93,24 @@ message FeedbackMetadata {
// extra info on the feedback (i.e. the survey question, the rating options, the feedback origin, etc.)
Origin origin = 1 [ (validate.rules).enum = {defined_only : true not_in : 0} ];
Survey survey = 2 [ (validate.rules).message = {required : true} ];
// TODO: remove if we decide to record feedback only when a user clicks the submit button
bool user_submitted = 3;
string url_search_params = 4;
}
message Feedback {
// url path of where the feedback was submitted
string url_path = 1 [ (validate.rules).string = {min_bytes : 1} ];
// workflow url path, workflow name or area of feedback that the submission is for
string feedback_type = 1 [ (validate.rules).string = {min_bytes : 1} ];
// the text option the user selected (i.e. bad/ok/great)
string rating_label = 2 [ (validate.rules).string = {min_bytes : 1} ];
// the corresponding rating scale selection
RatingScale rating_scale = 3 [ (validate.rules).message = {required : true} ];
// (optional) freeform input
string freeform_response = 4;
// (optional) some UI components (i.e the header) will have a dropdown menu for choosing the type of
// feedback to submit (i.e. "General", "K8s Delete Pod")
string feedback_type = 5;
}
message SubmitFeedbackRequest {
// client-genereated unique feedback id, which we will also use to update the feedback (essentially replace with the
// latest)
// TODO: remove if we decide to record feedback only when a user clicks the submit button
string id = 1 [ (validate.rules).string.len = 36 ];
// user's email
string user_id = 2 [ (validate.rules).string = {min_bytes : 1} ];
......
......@@ -436,11 +436,10 @@ type FeedbackMetadata struct {
unknownFields protoimpl.UnknownFields
// extra info on the feedback (i.e. the survey question, the rating options, the feedback origin, etc.)
Origin Origin `protobuf:"varint,1,opt,name=origin,proto3,enum=clutch.feedback.v1.Origin" json:"origin,omitempty"`
Survey *Survey `protobuf:"bytes,2,opt,name=survey,proto3" json:"survey,omitempty"`
// TODO: remove if we decide to record feedback only when a user clicks the submit button
UserSubmitted bool `protobuf:"varint,3,opt,name=user_submitted,json=userSubmitted,proto3" json:"user_submitted,omitempty"`
UrlSearchParams string `protobuf:"bytes,4,opt,name=url_search_params,json=urlSearchParams,proto3" json:"url_search_params,omitempty"`
Origin Origin `protobuf:"varint,1,opt,name=origin,proto3,enum=clutch.feedback.v1.Origin" json:"origin,omitempty"`
Survey *Survey `protobuf:"bytes,2,opt,name=survey,proto3" json:"survey,omitempty"`
UserSubmitted bool `protobuf:"varint,3,opt,name=user_submitted,json=userSubmitted,proto3" json:"user_submitted,omitempty"`
UrlSearchParams string `protobuf:"bytes,4,opt,name=url_search_params,json=urlSearchParams,proto3" json:"url_search_params,omitempty"`
}
func (x *FeedbackMetadata) Reset() {
......@@ -508,17 +507,14 @@ type Feedback struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// url path of where the feedback was submitted
UrlPath string `protobuf:"bytes,1,opt,name=url_path,json=urlPath,proto3" json:"url_path,omitempty"`
// workflow url path, workflow name or area of feedback that the submission is for
FeedbackType string `protobuf:"bytes,1,opt,name=feedback_type,json=feedbackType,proto3" json:"feedback_type,omitempty"`
// the text option the user selected (i.e. bad/ok/great)
RatingLabel string `protobuf:"bytes,2,opt,name=rating_label,json=ratingLabel,proto3" json:"rating_label,omitempty"`
// the corresponding rating scale selection
RatingScale *RatingScale `protobuf:"bytes,3,opt,name=rating_scale,json=ratingScale,proto3" json:"rating_scale,omitempty"`
// (optional) freeform input
FreeformResponse string `protobuf:"bytes,4,opt,name=freeform_response,json=freeformResponse,proto3" json:"freeform_response,omitempty"`
// (optional) some UI components (i.e the header) will have a dropdown menu for choosing the type of
// feedback to submit (i.e. "General", "K8s Delete Pod")
FeedbackType string `protobuf:"bytes,5,opt,name=feedback_type,json=feedbackType,proto3" json:"feedback_type,omitempty"`
}
func (x *Feedback) Reset() {
......@@ -553,9 +549,9 @@ func (*Feedback) Descriptor() ([]byte, []int) {
return file_feedback_v1_feedback_proto_rawDescGZIP(), []int{6}
}
func (x *Feedback) GetUrlPath() string {
func (x *Feedback) GetFeedbackType() string {
if x != nil {
return x.UrlPath
return x.FeedbackType
}
return ""
}
......@@ -581,13 +577,6 @@ func (x *Feedback) GetFreeformResponse() string {
return ""
}
func (x *Feedback) GetFeedbackType() string {
if x != nil {
return x.FeedbackType
}
return ""
}
type SubmitFeedbackRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
......@@ -595,7 +584,6 @@ type SubmitFeedbackRequest struct {
// client-genereated unique feedback id, which we will also use to update the feedback (essentially replace with the
// latest)
// TODO: remove if we decide to record feedback only when a user clicks the submit button
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// user's email
UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
......@@ -768,70 +756,69 @@ var file_feedback_v1_feedback_proto_rawDesc = []byte{
0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x12,
0x2a, 0x0a, 0x11, 0x75, 0x72, 0x6c, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x70, 0x61,
0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x72, 0x6c, 0x53,
0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xfa, 0x01, 0x0a, 0x08,
0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x22, 0x0a, 0x08, 0x75, 0x72, 0x6c, 0x5f,
0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72,
0x02, 0x20, 0x01, 0x52, 0x07, 0x75, 0x72, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2a, 0x0a, 0x0c,
0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0b, 0x72, 0x61, 0x74,
0x69, 0x6e, 0x67, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x4c, 0x0a, 0x0c, 0x72, 0x61, 0x74, 0x69,
0x6e, 0x67, 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f,
0x2e, 0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b,
0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x42,
0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x72, 0x61, 0x74, 0x69, 0x6e,
0x67, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x66, 0x72, 0x65, 0x65, 0x66, 0x6f,
0x72, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x10, 0x66, 0x72, 0x65, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x64,
0x62, 0x61, 0x63, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0xe3, 0x01, 0x0a, 0x15, 0x53, 0x75, 0x62,
0x6d, 0x69, 0x74, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08,
0xfa, 0x42, 0x05, 0x72, 0x03, 0x98, 0x01, 0x24, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x07,
0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa,
0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x42,
0x0a, 0x08, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61,
0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x08,
0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61,
0x63, 0x6b, 0x12, 0x4a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2e, 0x66, 0x65,
0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61,
0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a,
0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x18,
0x0a, 0x16, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x38, 0x0a, 0x06, 0x4f, 0x72, 0x69, 0x67,
0x69, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x52, 0x49, 0x47, 0x49, 0x4e, 0x5f, 0x55, 0x4e, 0x53,
0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x45,
0x41, 0x44, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x57, 0x49, 0x5a, 0x41, 0x52, 0x44,
0x10, 0x02, 0x2a, 0x45, 0x0a, 0x0b, 0x45, 0x6d, 0x6f, 0x6a, 0x69, 0x52, 0x61, 0x74, 0x69, 0x6e,
0x67, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4d, 0x4f, 0x4a, 0x49, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x41, 0x44, 0x10,
0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x45, 0x55, 0x54, 0x52, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x09,
0x0a, 0x05, 0x48, 0x41, 0x50, 0x50, 0x59, 0x10, 0x03, 0x32, 0xad, 0x02, 0x0a, 0x0b, 0x46, 0x65,
0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x41, 0x50, 0x49, 0x12, 0x85, 0x01, 0x0a, 0x0a, 0x47, 0x65,
0x74, 0x53, 0x75, 0x72, 0x76, 0x65, 0x79, 0x73, 0x12, 0x25, 0x2e, 0x63, 0x6c, 0x75, 0x74, 0x63,
0x68, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65,
0x74, 0x53, 0x75, 0x72, 0x76, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x26, 0x2e, 0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63,
0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x72, 0x76, 0x65, 0x79, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22,
0x17, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2f, 0x67, 0x65,
0x74, 0x53, 0x75, 0x72, 0x76, 0x65, 0x79, 0x73, 0x3a, 0x01, 0x2a, 0xaa, 0xe1, 0x1c, 0x02, 0x08,
0x02, 0x12, 0x95, 0x01, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x46, 0x65, 0x65, 0x64,
0x62, 0x61, 0x63, 0x6b, 0x12, 0x29, 0x2e, 0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2e, 0x66, 0x65,
0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xdf, 0x01, 0x0a, 0x08,
0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x2c, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x64,
0x62, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61,
0x63, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67,
0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42,
0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0b, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x61, 0x62,
0x65, 0x6c, 0x12, 0x4c, 0x0a, 0x0c, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x63, 0x61,
0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6c, 0x75, 0x74, 0x63,
0x68, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61,
0x74, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01,
0x02, 0x10, 0x01, 0x52, 0x0b, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x61, 0x6c, 0x65,
0x12, 0x2b, 0x0a, 0x11, 0x66, 0x72, 0x65, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x66, 0x72, 0x65,
0x65, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe3, 0x01,
0x0a, 0x15, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x98, 0x01, 0x24, 0x52, 0x02, 0x69,
0x64, 0x12, 0x20, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x06, 0x75, 0x73, 0x65,
0x72, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2e, 0x66,
0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x62,
0x61, 0x63, 0x6b, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x66,
0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x4a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6c, 0x75, 0x74,
0x63, 0x68, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x46,
0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42,
0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0x22, 0x18, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x46, 0x65, 0x65,
0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x38, 0x0a,
0x06, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x52, 0x49, 0x47, 0x49,
0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
0x0a, 0x0a, 0x06, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x57,
0x49, 0x5a, 0x41, 0x52, 0x44, 0x10, 0x02, 0x2a, 0x45, 0x0a, 0x0b, 0x45, 0x6d, 0x6f, 0x6a, 0x69,
0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4d, 0x4f, 0x4a, 0x49, 0x5f,
0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a,
0x03, 0x53, 0x41, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x45, 0x55, 0x54, 0x52, 0x41,
0x4c, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x41, 0x50, 0x50, 0x59, 0x10, 0x03, 0x32, 0xad,
0x02, 0x0a, 0x0b, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x41, 0x50, 0x49, 0x12, 0x85,
0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x75, 0x72, 0x76, 0x65, 0x79, 0x73, 0x12, 0x25, 0x2e,
0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2e,
0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x72, 0x76, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2e, 0x66, 0x65,
0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x72,
0x76, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x1c, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61,
0x63, 0x6b, 0x2f, 0x67, 0x65, 0x74, 0x53, 0x75, 0x72, 0x76, 0x65, 0x79, 0x73, 0x3a, 0x01, 0x2a,
0xaa, 0xe1, 0x1c, 0x02, 0x08, 0x02, 0x12, 0x95, 0x01, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69,
0x74, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x29, 0x2e, 0x63, 0x6c, 0x75, 0x74,
0x63, 0x68, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53,
0x75, 0x62, 0x6d, 0x69, 0x74, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2e, 0x66, 0x65,
0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74,
0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x2a, 0x2e, 0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63,
0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x46, 0x65, 0x65, 0x64, 0x62,
0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63,
0x6b, 0x2f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b,
0x3a, 0x01, 0x2a, 0xaa, 0xe1, 0x1c, 0x02, 0x08, 0x01, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x79, 0x66, 0x74, 0x2f, 0x63, 0x6c, 0x75,
0x74, 0x63, 0x68, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f,
0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2f, 0x76, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x64,
0x62, 0x61, 0x63, 0x6b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x65,
0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x46, 0x65, 0x65,
0x64, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x01, 0x2a, 0xaa, 0xe1, 0x1c, 0x02, 0x08, 0x01, 0x42, 0x3b,
0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x79, 0x66,
0x74, 0x2f, 0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2f, 0x76, 0x31,
0x3b, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
......
......@@ -942,9 +942,9 @@ func (m *Feedback) validate(all bool) error {
var errors []error
if len(m.GetUrlPath()) < 1 {
if len(m.GetFeedbackType()) < 1 {
err := FeedbackValidationError{
field: "UrlPath",
field: "FeedbackType",
reason: "value length must be at least 1 bytes",
}
if !all {
......@@ -1006,8 +1006,6 @@ func (m *Feedback) validate(all bool) error {
// no validation rules for FreeformResponse
// no validation rules for FeedbackType
if len(errors) > 0 {
return FeedbackMultiError(errors)
}
......
......@@ -13,7 +13,7 @@ import (
func TestProcessSubmission(t *testing.T) {
id := "00000000-0000-0000-0000-000000000000"
userId := "foo@example.com"
validFeedbackTestCase := &feedbackv1.Feedback{UrlPath: "/k8s/deletePod", RatingLabel: "great", RatingScale: &feedbackv1.RatingScale{
validFeedbackTestCase := &feedbackv1.Feedback{FeedbackType: "/k8s/deletePod", RatingLabel: "great", RatingScale: &feedbackv1.RatingScale{
Type: &feedbackv1.RatingScale_Emoji{Emoji: feedbackv1.EmojiRating_HAPPY},
}}
vailidMetadataTestCase := &feedbackv1.FeedbackMetadata{
......@@ -49,7 +49,7 @@ func TestProcessSubmission(t *testing.T) {
{
id: id,
userId: "",
feedback: &feedbackv1.Feedback{UrlPath: "/k8s/deletePod", RatingLabel: "great"},
feedback: &feedbackv1.Feedback{FeedbackType: "/k8s/deletePod", RatingLabel: "great"},
metadata: vailidMetadataTestCase,
},
// metadata is nil
......
......@@ -10622,8 +10622,8 @@ export namespace clutch {
/** Properties of a Feedback. */
interface IFeedback {
 
/** Feedback urlPath */
urlPath?: (string|null);
/** Feedback feedbackType */
feedbackType?: (string|null);
 
/** Feedback ratingLabel */
ratingLabel?: (string|null);
......@@ -10633,9 +10633,6 @@ export namespace clutch {
 
/** Feedback freeformResponse */
freeformResponse?: (string|null);
/** Feedback feedbackType */
feedbackType?: (string|null);
}
 
/** Represents a Feedback. */
......@@ -10647,8 +10644,8 @@ export namespace clutch {
*/
constructor(properties?: clutch.feedback.v1.IFeedback);
 
/** Feedback urlPath. */
public urlPath: string;
/** Feedback feedbackType. */
public feedbackType: string;
 
/** Feedback ratingLabel. */
public ratingLabel: string;
......@@ -10659,9 +10656,6 @@ export namespace clutch {
/** Feedback freeformResponse. */
public freeformResponse: string;
 
/** Feedback feedbackType. */
public feedbackType: string;
/**
* Verifies a Feedback message.
* @param message Plain object to verify
......@@ -25846,11 +25846,10 @@ export const clutch = $root.clutch = (() => {
* Properties of a Feedback.
* @memberof clutch.feedback.v1
* @interface IFeedback
* @property {string|null} [urlPath] Feedback urlPath
* @property {string|null} [feedbackType] Feedback feedbackType
* @property {string|null} [ratingLabel] Feedback ratingLabel
* @property {clutch.feedback.v1.IRatingScale|null} [ratingScale] Feedback ratingScale
* @property {string|null} [freeformResponse] Feedback freeformResponse
* @property {string|null} [feedbackType] Feedback feedbackType
*/
 
/**
......@@ -25869,12 +25868,12 @@ export const clutch = $root.clutch = (() => {
}
 
/**
* Feedback urlPath.
* @member {string} urlPath
* Feedback feedbackType.
* @member {string} feedbackType
* @memberof clutch.feedback.v1.Feedback
* @instance
*/
Feedback.prototype.urlPath = "";
Feedback.prototype.feedbackType = "";
 
/**
* Feedback ratingLabel.
......@@ -25900,14 +25899,6 @@ export const clutch = $root.clutch = (() => {
*/
Feedback.prototype.freeformResponse = "";
 
/**
* Feedback feedbackType.
* @member {string} feedbackType
* @memberof clutch.feedback.v1.Feedback
* @instance
*/
Feedback.prototype.feedbackType = "";
/**
* Verifies a Feedback message.
* @function verify
......@@ -25919,9 +25910,9 @@ export const clutch = $root.clutch = (() => {
Feedback.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.urlPath != null && message.hasOwnProperty("urlPath"))
if (!$util.isString(message.urlPath))
return "urlPath: string expected";
if (message.feedbackType != null && message.hasOwnProperty("feedbackType"))
if (!$util.isString(message.feedbackType))
return "feedbackType: string expected";
if (message.ratingLabel != null && message.hasOwnProperty("ratingLabel"))
if (!$util.isString(message.ratingLabel))
return "ratingLabel: string expected";
......@@ -25933,9 +25924,6 @@ export const clutch = $root.clutch = (() => {
if (message.freeformResponse != null && message.hasOwnProperty("freeformResponse"))
if (!$util.isString(message.freeformResponse))
return "freeformResponse: string expected";
if (message.feedbackType != null && message.hasOwnProperty("feedbackType"))
if (!$util.isString(message.feedbackType))
return "feedbackType: string expected";
return null;
};
 
......@@ -25951,8 +25939,8 @@ export const clutch = $root.clutch = (() => {
if (object instanceof $root.clutch.feedback.v1.Feedback)
return object;
let message = new $root.clutch.feedback.v1.Feedback();
if (object.urlPath != null)
message.urlPath = String(object.urlPath);
if (object.feedbackType != null)
message.feedbackType = String(object.feedbackType);
if (object.ratingLabel != null)
message.ratingLabel = String(object.ratingLabel);
if (object.ratingScale != null) {
......@@ -25962,8 +25950,6 @@ export const clutch = $root.clutch = (() => {
}
if (object.freeformResponse != null)
message.freeformResponse = String(object.freeformResponse);
if (object.feedbackType != null)
message.feedbackType = String(object.feedbackType);
return message;
};
 
......@@ -25981,22 +25967,19 @@ export const clutch = $root.clutch = (() => {
options = {};
let object = {};
if (options.defaults) {
object.urlPath = "";
object.feedbackType = "";
object.ratingLabel = "";
object.ratingScale = null;
object.freeformResponse = "";
object.feedbackType = "";
}
if (message.urlPath != null && message.hasOwnProperty("urlPath"))
object.urlPath = message.urlPath;
if (message.feedbackType != null && message.hasOwnProperty("feedbackType"))
object.feedbackType = message.feedbackType;
if (message.ratingLabel != null && message.hasOwnProperty("ratingLabel"))
object.ratingLabel = message.ratingLabel;
if (message.ratingScale != null && message.hasOwnProperty("ratingScale"))
object.ratingScale = $root.clutch.feedback.v1.RatingScale.toObject(message.ratingScale, options);
if (message.freeformResponse != null && message.hasOwnProperty("freeformResponse"))
object.freeformResponse = message.freeformResponse;
if (message.feedbackType != null && message.hasOwnProperty("feedbackType"))
object.feedbackType = message.feedbackType;
return object;
};
 
......@@ -151,7 +151,7 @@ const NPSFeedback = (opts: FeedbackOptions) => {
ratingScale: {
emoji: IClutch.feedback.v1.EmojiRating[selected.emoji],
},
urlPath: window.location.pathname,
feedbackType: window.location.pathname,
freeformResponse: trimmed,
},
metadata: {
......
......@@ -12,7 +12,7 @@ import { useDashUpdater } from "./dash-hooks";
import { deriveStateData, DispatchContext, StateContext } from "./helpers";
import ProjectGroup from "./project-group";
import selectorReducer from "./selector-reducer";
import { loadStoredState, storeState } from "./storage";
import { storeState } from "./storage";
import type { Action, DashState, State } from "./types";
import { Group } from "./types";
......@@ -92,6 +92,7 @@ const hydrateProjects = (state: State, dispatch: React.Dispatch<Action>) => {
users: string[];
projects: string[];
};
_.forEach(Object.keys(state[Group.PROJECTS]), p => {
// if the project is custom
if (state[Group.PROJECTS][p].custom) {
......@@ -118,7 +119,8 @@ const ProjectSelector = () => {
const [customProject, setCustomProject] = React.useState("");
const { updateSelected } = useDashUpdater();
const [state, dispatch] = React.useReducer(selectorReducer, loadStoredState(initialState));
// TODO: restore usage of loadStoredState once we fix the issue with deprecated projects
const [state, dispatch] = React.useReducer(selectorReducer, initialState);
React.useEffect(() => {
const interval = setInterval(() => hydrateProjects(state, dispatch), 30000);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment