wooden-pizza-89220
09/22/2022, 4:59 PMextra_params
in the custom Resource Tool. The extra parameters I'm sending in the :create
are not ones being saved on my database, but rather, getting JSON-ified in order to send to an AWS Secrets Manager.
In my Resource tool, I have
self.extra_params = [{
the_secrets: %i[some_key some_token some_provider_id some_account_id]
}]
Then, like the docs say, I have a method in my model to parse the hash I'm receiving from `the_secrets`:
def handle_secrets=(value)
@those_secrets = value.to_json
end
The issue is, the extra_params
method seems to be conflicting with the other permit I have for the required params needed for AWS (let's just say they're :name, :type, :id
). I'm seeing two warnings for Unpermitted parameters
with different values. Only one includes the_secrets
hash I created. Does anyone know why this could be happening?
https://docs.avohq.io/2.0/resource-tools.html#add-custom-fields-on-formslemon-wall-20836
09/22/2022, 5:46 PMdef the_secrets=(value)
instead of handle_secrets=
?wooden-pizza-89220
09/22/2022, 5:48 PMlemon-wall-20836
09/22/2022, 5:49 PMlemon-wall-20836
09/22/2022, 5:49 PMparams.permit
method twice. once for the regular params and once for the extra params and the first time we don't permite the extra oneswooden-pizza-89220
09/22/2022, 7:02 PMdef the_secrets=(value)
@csecret_params = value.to_json
end
def persist_in_secrets_manager
-using @secret_params in here-
end
I'm able to create all of my data successfully and it persists in AWS in my QA instance. There are still 3 Unpermitted Parameters
that aren't getting used for AWS but are persisted to the DB.lemon-wall-20836
09/23/2022, 6:20 AMwooden-pizza-89220
09/23/2022, 4:04 PMhtml.erb
file for resource tools/`Avo::PanelComponent`? I noticed you had a utility class called input_classes
and was very thankful. I was able to copy-paste the classes from the main panel to get my resource tool to look similar, but thought that would be a nice-to-have.
Also, in the docs for the native Panel Component, one of the options to include is data
. I added it in after the title and description, made sure it was a hash, but I couldn't seem to access it even in pry. Could there be an addition to the docs on implementation?lemon-wall-20836
09/26/2022, 6:42 AMlemon-wall-20836
09/26/2022, 6:42 AMlemon-wall-20836
09/26/2022, 6:44 AMlemon-wall-20836
09/26/2022, 6:45 AMlemon-wall-20836
09/26/2022, 6:45 AMlemon-wall-20836
09/26/2022, 6:45 AM