ingenico-group / foreman_expire_hosts

Deprecated, see https://github.com/theforeman/foreman_expire_hosts theforeman plugin for limiting host lifetime
https://github.com/theforeman/foreman
GNU General Public License v3.0
5 stars 3 forks source link

plugin settings are confusing #2

Closed ohadlevy closed 3 years ago

ohadlevy commented 9 years ago

Hi,

just wondering, out of the below example (copied from the readme) - why do we need settings like

I would assume other positioning objects (like after) is even not really going to be used by users?

:host_expired_on:
  :host_form:
    :view: :expired_on_input_field
    :after: model_name
    :is_mandatory: true  # This can be modified to true/false. If this is true then host will not allow to create with out expired_on value
  :host_show:
    :view: :expired_on_field
  :delete_hosts:
    :notify1_days_before_expiry: 7 # Send first notification to owner of hosts about his hosts expiring in given days. Default = 7 days before host expiry
    :notify2_days_before_expiry: 1 # Second notification. Default = 1 days before host expiry
    :days_to_delete_after_expiration: 3 # Delete expired hosts after given days of hosts expiry date. Default = 3 days of it expiry
    :notify_emails: ["foreman-admin@your_foreman.com", "foreman-admin2@your_foreman.com"] # All notifications will be delivered to its owner. If any other users/admins need to receive those expiry wanting notifications then those emails can be configured here. This is the Array of email address and can give multiple emails in array. If no users need to receive notifications then this can be empty array []

Also, I think the best thing would be to move these settings into proper settings objects, then they could be edited under settings and not require application restart?

nagarjuna commented 9 years ago

:expired_on_input_field and :expired_on_field are to enable the field in the view. If this plugin is installed then by default the fields are shown, then we can remove these two fields.

:after: is also can remove and hardcode in overrides.

Actually this is one time edit so we kept in yaml file. If keeping these settings in settings objects, then will move. Please confirm so that i will work on it

ohadlevy commented 9 years ago

@nagarjuna I tend to think its best to put in it the db (we already support that - see other plugins for examples?)

thanks!

nagarjuna commented 9 years ago

@ohadlevy can i add Expiry Hosts subtab in settings and add all settings under that subtab?

ohadlevy commented 9 years ago

yes, this happens automatically when you have your own setting sub class

On Mon, May 11, 2015 at 3:07 PM, Nagarjuna Rachaneni < notifications@github.com> wrote:

@ohadlevy https://github.com/ohadlevy can i add Expiry Hosts subtab in settings and add all settings under that subtab?

— Reply to this email directly or view it on GitHub https://github.com/ingenico-group/foreman_expire_hosts/issues/2#issuecomment-100887403 .

nagarjuna commented 9 years ago

@ohadlevy If i want to add setting default value as blank it is not supporting. example :notify_emails: must be string with coma(,) separated and default is blank. How can i do this ?

ahmet2mir commented 3 years ago

Deprecated repo, see https://github.com/theforeman/foreman_expire_hosts