newrelic / nr1-pathpoint

Pathpoint is an enterprise platform tracker that models system health in relation to actual user-impacting business stages.
Apache License 2.0
9 stars 19 forks source link

`measure_time` is not being treated case insensitively (ignores lower case) #52

Closed portoren closed 1 year ago

portoren commented 2 years ago

Description

If in the JSON config file the measure_time is defined as "5 minutes ago", using lower case, this is interpreted as custom. The measure_time is only considered by default when it is set to uppercase with the value of “5 MINUTES AGO”. This causes the Time-Picker to have no effect on those touchpoints and can be confusing for the user.

Steps to Reproduce

  1. Enter the Pathpoint menu to download the JSON config file.

image

  1. Select the “Json configuration” option from the menu and then click the download button.

image

  1. In the JSON config file, you can see the measute_time properties in lowercase and uppercase of two touchpoints of the same type.

image

  1. When the Time-Picker is selected for example in “60 minutes ago” and we download the JSON-FILE again, we observe that this selection only has an effect on the touchpoints with the measure_time defined in uppercase, the touchpoints with the time defined in lowercase they are not affected because it is considered as custom:

image

Expected Behaviour

The interpreter of the measure_time attribute must recognize the default value of "5 Minutes Ago" with a case-insensitive filter.

Relevant Logs / Console output

Your Environment

Additional context

JimHagan commented 2 years ago

Thanks for the submission @portoren .

I can see this is somewhat related to #51 but different enough to keep it separate.

My suggsetions

  1. Make loading of the measure_time to be case insensitive
  2. As mentioned in #51 we should raise an exception when loading a JSON file with an until clause in the measure_time name. We don't want users setting an absolute end time for a time window.
  3. Consider upper casing the measure_time when a JSON is saved
  4. Raise an error when the user tries save any of the of the following in a measure_time
    • an UNTIL clause
    • missing a AGO statement
JimHagan commented 1 year ago

@portoren Any more estimate on how long it may take to work on this?

nr-opensource-bot commented 1 year ago

:tada: This issue has been resolved in version 1.7.4 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: