Skip to content

Add YML validation warning to metrics view

Andrei Stoicescu requested to merge dashboardValidationWarnings into master

What does this MR do?

Adds a warning to the Operations > Metrics view that is displayed when YML dashboard validation requires it.

The warning should be generic and should not reference the exact problems that the YML file presents, as the detailed warnings can be seen in the file editing view, where the client can take action on them.

Related Issue

#210289 (closed)

Screenshots

Screenshot_2020-06-11_at_17.49.56

Screen_Recording_2020-06-16_at_23.29.35

How to test locally

  1. Add a dashboard yml file with an empty required field, such as unit field with a value of "":
dashboard: "Faulty dashboard"
panel_groups:  
  - group: "Operations group"
    panels:      
      - type: area-chart
        title: "Test"
        y_label: "total request"
        metrics:
          - id: metric_of_ages
            query_range: 'http_requests_total'
            label: "Instance"
            unit: ""
  1. In Operations > Metrics, select the newly created dashboard. A warning should be displayed.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports