Skip to content
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

Add support for user information in templates #89

Closed
wants to merge 9 commits into from

Conversation

acmeguy
Copy link

@acmeguy acmeguy commented Nov 21, 2018

Hi,

Here is a minor change that allows users to information about the current user in queries.
Hope it is well received.

Regards,

  • Stefán

@acmeguy
Copy link
Author

acmeguy commented Nov 22, 2018

Added the ability to select natural breakdown of information based on the length of the period being visualized

@hagen1778
Copy link
Collaborator

Hi @acmeguy !

Sorry for the very late response.

Could you plz provide a few examples where user information and $naturalTimeSeries will be useful?

@@ -1,4 +1,6 @@
dist/*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately dist is required folder for submit grafana plugin to grafana-plugins-repository

else if (duration < FEW_HOURS) return 'toUInt32(toStartOfMinute(timestamp)) * 1000';
else if (duration < SOME_HOURS) return 'toUInt32(toStartOfFiveMinute(timestamp)) * 1000';
else if (duration < MANY_HOURS) return 'toUInt32(toStartOfFifteenMinutes(timestamp)) * 1000';
else if (duration < FEW_DAYS) return 'toUInt32(toStartOfHour(timestamp)) * 1000';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look like we shall use $dateTimeCol here instead of timestamp

@Slach
Copy link
Collaborator

Slach commented Jun 15, 2020

Dear @acmeguy, could you resolve conflicts, remove .dist from .gitignore, and provide jest unit tests that covered your and try to test your changes with grafana7 docker-compose environment?

Also we need improve README.md where explain when and why we need use $naturalTimeSeries

Unfortunately, we can't merge significant changes in query macros without coverage by a unit test

@Slach
Copy link
Collaborator

Slach commented Jul 27, 2020

@acmeguy sorry for send you message again ;) maybe you can add permission for @Slach account in your repository and I could resolve conflicts for your branch?

@acmeguy
Copy link
Author

acmeguy commented Jul 27, 2020

I will gladly attend to this soon I had not noticed earlier requests

@Slach
Copy link
Collaborator

Slach commented Aug 10, 2020

Hello @acmeguy,
do you have any news about this pull request?

@Slach
Copy link
Collaborator

Slach commented Nov 15, 2021

@acmeguy any news about this PR?

@Slach
Copy link
Collaborator

Slach commented Nov 15, 2021

@acmeguy according to
grafana/grafana#4922
latest version of grafana succefully support embedded templating variables

${__user.email}
${__user.name}
${__user.login}
${__org.name}

@Slach Slach closed this Nov 15, 2021
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.

3 participants