Add fields for GCP config to streaming form
Problem Statement
Create a separate form for Google Cloud Logging integration. This form should allow user to input the required Google Cloud Logging configuration data - Google project ID, client email, Log ID, and private key.
Proposed Solution
Add a new form for google cloud logging integration. This form should use GraphQL APIs being implemented in Create GraphQL APIs for Google Cloud Logging data (#409422 - closed) • Harsimar Sandhu • 16.1.
Design
The design is based on the updated design of Update streaming audit event UI styles
Please see the description area for the overview and Figma for the specs
-
Add streaming destinationto a dropdown, separate HTTP destination creation and 3rd party creation - Add all the filled
When we only provide GCP, we disable the selection for3rd party sourceand show a tooltip- Show error messages
Implementation plan
- This is only at top-group level at the moment so will need to add
v-if="!isInstance"on all components - Update
ee/app/assets/javascripts/audit_events/components/audit_events_stream.vueto pull in a list of google logging destinations using the API and store in a new destinations variable calledgoogleCloudLoggingAuditEventDestinations - Duplicate the
stream-itemcomponent on line 52 displaying the destinations - Update button on line 140 to a drop down button with dropdown items in
ee/app/assets/javascripts/audit_events/components/audit_events_stream.vue - Duplicate
ee/app/assets/javascripts/audit_events/components/stream/stream_destination_editor.vueinto a new component calledstream_google_cloud_logging_destination_editor.vue - In new component update the form to use the new fields and use the new GraphQL APIs to update, create and delete
- Import new component into
ee/app/assets/javascripts/audit_events/components/stream/stream_item.vueandee/app/assets/javascripts/audit_events/components/audit_events_stream.vue - Create a new computed prop in both to get the destination type and switch between the
stream_destination_editor.vueand newstream_google_cloud_logging_destination_editor.vue - Update delete mutation to use new API in
stream_item.vue - Update tests
- Update documentation
Edited by Nate Rosandich