How to create dashbroad variables that reads

Hi all,

How can I create dashboard that way so the label dynamically updates after adding/updating datasource ?

So in brief, my promtail loads all the files from /loki/logs dir, a lot of files under different directories for example:

. .
. .
. .
... and so on

the promtail config is as follow:

- job_name: mycomblogs
 entry_parser: raw
* static_configs:
 - targets:
 - localhost
 job: mycomblogs
 cluster: multipass-cluster
 __path__: /loki/logs/*/*/comblogs/*log

everything works great, I can get specific logs and timeframes with regex like:

{job="mycomblogs", filename=~"/loki/logs/1111/.*.",filename=~".*.host1.all"} |~ "2022-03-29T11:16"

but I dont know how can I make dashboard that would show/point to /loki/logs/1111 directory as label and allow me to browse only files in 1111 dir? and when I add dir 8888 it would auto update the dashboard so I have labels 1111,2222…8888

Or is there any other way to sort those directories automatically and every time new directories are added the labels would reflect that ?

thanks in advance!