8000 [FEATURE] Add $__range(_ms/_s) builtin variables + add support for curly bracket variables + fix prefixed variables by other variable name by Gladorme · Pull Request #1376 · perses/perses · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[FEATURE] Add $__range(_ms/_s) builtin variables + add support for curly bracket variables + fix prefixed variables by other variable name #1376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 23, 2023

Conversation

Gladorme
Copy link
Member
@Gladorme Gladorme commented Aug 23, 2023

Description

  • Add builtin variables:
    • $__range: The range for the current dashboard in "human" readable format (1y 1w 1d 1h 1m 1s)
    • $__range_s: The range for the current dashboard in second
    • $__range_ms: The range for the current dashboard in millisecond
  • Add support for curly bracket variables: $varName can also be written ${varName}
  • Fix prefixed variables by other variable name, before $__range_ms was parsed 3600_ms instead of 3600000. Because $__range was applied before $__range_ms. Now variables with longer names are applied first.

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, IGNORE.
  • All commits have DCO signoffs.

Closes #1345

…rval, __rate_interval)

Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
@Gladorme Gladorme marked this pull request as ready for review August 23, 2023 09:28
@Gladorme Gladorme changed the title [FEATURE] Add $__range(_ms/_s) builtin variables + add support for brackets variables + fix prefixed variables by other variable name [FEATURE] Add $__range(_ms/_s) builtin variables + add support for curly bracket variables + fix prefixed variables by other variable name Aug 23, 2023
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
@Gladorme Gladorme requested a review from celian-garcia August 23, 2023 14:17
@Gladorme Gladorme merged commit 7fa5ec8 into main Aug 23, 2023
@Gladorme Gladorme deleted the gladorme/builtin-var-2 branch August 23, 2023 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change variable syntax from $myVar to ${myVar}
2 participants
0