File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
app/_plugins/drops/entity_example/presenters Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ class Base < Presenters::Base # rubocop:disable Style/Documentation
1313 def entity
1414 @entity ||= if @example_drop . entity_type == 'target'
1515 'upstreams'
16+ elsif @example_drop . entity_type == 'sni'
17+ 'certificates'
1618 else
1719 "#{ @example_drop . entity_type } s"
1820 end
@@ -44,6 +46,11 @@ def missing_variables
4446 def _data
4547 if @example_drop . entity_type == 'target'
4648 { 'name' => 'example_upstream' , 'targets' => [ @example_drop . data ] }
49+ elsif @example_drop . entity_type == 'sni'
50+ { 'id' => @example_drop . data . dig ( 'certificate' , 'id' ) ,
51+ 'cert' => "-----BEGIN CERTIFICATE-----\n -----END CERTIFICATE-----" ,
52+ 'key' => "-----BEGIN RSA PRIVATE KEY-----\n -----END RSA PRIVATE KEY" ,
53+ 'snis' => [ @example_drop . data . except ( 'certificate' ) ] }
4754 else
4855 @example_drop . data
4956 end
You can’t perform that action at this time.
0 commit comments