Skip to content
Snippets Groups Projects

Add support for metrics embeds not backed by the DB

Merged Sarah Yasonik requested to merge sy-transient-embeds into master
All threads resolved!
7 files
+ 155
1
Compare changes
  • Side-by-side
  • Inline
Files
7
  • 645461f6
    Add support for DB-less embeds · 645461f6
    Sarah Yasonik authored
    In order to support metrics embeds for alerts from external
    alerting sources, we need a way to store that content,
    because the alert does not yet live in the database.
    
    This adds a class which allows post-processing for a
    url-provided embed json object. As dashboard content is
    already user-provided, this poses no further security concerns.
@@ -222,7 +222,7 @@ def metrics_params
def metrics_dashboard_params
params
.permit(:embedded, :group, :title, :y_label, :dashboard_path, :environment, :sample_metrics)
.permit(:embedded, :group, :title, :y_label, :dashboard_path, :environment, :sample_metrics, :embed_json)
.merge(dashboard_path: params[:dashboard], environment: environment)
end
Loading