hwsc-org / hwsc-app-gateway-svc

Web application gateway management service
https://hwsc-org.github.io/hwsc-app-gateway-svc/
0 stars 0 forks source link

Epic/ListDistinctFieldValues #15

Open faraonc opened 5 years ago

faraonc commented 5 years ago

Objective

Chrome wants to get the following unique values for the following field names:

Purpose

To generate available values to search.

Procedure

  1. Chrome goes to Search Filter Page
  2. hwsc-frontend calls hwsc-app-gateway-svc's rpc ListDistinctFieldValues (AppGatewayServiceRequest) returns (AppGatewayServiceResponse) {}
    • Required args for AppGatewayServiceRequest
      • NONE
  3. hwsc-app-gateway-svc calls hwsc-document-svc's rpc ListDistinctFieldValues (DocumentRequest) returns (DocumentResponse) {}
    • Required args for DocumentRequest
      • NONE
  4. hwsc-document-svc queries MongoDB
  5. hwsc-document-svc's returns to hwsc-app-gateway-svc from rpc ListDistinctFieldValues (DocumentRequest) returns (DocumentResponse) {}
    • Status: &pb.DocumentResponse_Code{Code: uint32(codes.OK)}
      • Message: codes.OK.String()
      • QueryResults: queryResult
  6. hwsc-app-gateway-svc returns to hwsc-frontend from rpc ListDistinctFieldValues (AppGatewayServiceRequest) returns (AppGatewayServiceResponse) {}
    • Status: &pb.AppGatewayServiceResponse_Code{Code: uint32(codes.OK)}
      • Message: codes.OK.String()
      • QueryResults: queryResult
  7. hwsc-frontend checks Status or Message
  8. If OK hwsc-frontend renders Search Filter Page, else a default error page with error 500.