A general observation is that the acceptable values for almost all fields are either saved as plain constants or not at all, this gives a huge amount of headache when one tries to configure each field. Often times I find myself toggle editor generated JSON and grafana docs for configuring panel styles.
In general, all such values should be saved as Enums in a separate module and quoted as e.g. ReduceCalcs.Last.value and all validations can be done via in ReduceCalcs.values. This should be a preferred approach.
Looking forward to hear your opinions and would love to contribute some PRs for this.
A general observation is that the acceptable values for almost all fields are either saved as plain constants or not at all, this gives a huge amount of headache when one tries to configure each field. Often times I find myself toggle editor generated JSON and grafana docs for configuring panel styles.
In general, all such values should be saved as Enums in a separate module and quoted as e.g.
ReduceCalcs.Last.value
and all validations can be done viain ReduceCalcs.values
. This should be a preferred approach.Looking forward to hear your opinions and would love to contribute some PRs for this.