Having Start Date not older than today

Hello everyone, i have multiple dashboards and for some of the dashboards its mandatory that the start date should not be older than the present date. How is it possible to do so ?

What is the data source for this requirement

The dashboard use multiple panels with multiple datasourxws like zabbix and mysql

Just a thought…Can i call a django api once the user selects the story date?And return the response to grafana?

1 Like

yes you can with the infinity plugin. does it return json?

1 Like

you can always check to see if the date is older than today and reset it to today in the query language of the data source

you can easily do that in mysql for example

if ${__from} < getdate()

kind of thing.

Yes i can return a json with a message. When is the api called? Is its when the user selects rhe start date?

1 Like

Intresting can you give me an example please?

example of what?

I wanted to see an example for the one which You were mentioning that we can reset the date to today for mysql.

Also my requirement is to return a message as a warning if the user selects the old date.

I doubt you can have it return a message.

Is thrre no way to do that?

you could do it if using plugins that leverage javascript maybe? are you comfortable with using javascript?

the other you can do is provide your own calendar date picker that limits the chosen date to always be today and above

Yes i can try the java script. But do i avert from using the inbuilt time picker? Any ideas on the plugins which can do this functionality ?

Can you please guide me on this?

See this

Thank you @yosiasz for the url. Can you please tell me if i can raise a popup kind of thing if the start date is selected in past ?

Yes by using js

Using the JS with text panel, and the grafana events can be done ? Or any other way ?

1 Like