WIP: New endpoint to update an existing dashboard
What does this MR do?
As part of #34525 (closed), this MR creates an endpoint Projects::PerformanceMonitoring::DashboardsController#update
that will allow a user to update a custom monitoring dashboard. This creates a commit to the project's repository with the updated dashboard file.
The url is constructed as a PUT /*namespace_id/:project_id/-/performance_monitoring/dashboards/:file_name
. The file_name
is the name of the dashboard file that will be updated (located in .gitlab/dashboards/
), e.g. prom_alerts.yml
.
Required parameters:
-
file_content
the JSON content of the dashboard to replace the existing file -
branch
string with the name of the branch for the commit
Optional parameters:
-
commit_message
string with commit message (as in the #create action, a default can be used if none is provided)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
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 🤖