File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 3
3
# History
4
4
5
5
## Unreleased
6
+ - Fixed folder argument issue
7
+ - Fixed import dashboards into a folder
8
+
9
+ Thanks, @vrymar .
6
10
7
11
## 0.3.0 (2024-10-03)
8
12
* Permit invocation without configuration file for ad hoc operations.
Original file line number Diff line number Diff line change @@ -50,19 +50,21 @@ def grafana_settings(
50
50
51
51
# Grafana connectivity.
52
52
if url or "GRAFANA_URL" in os .environ :
53
- params = {"url" : url or os .environ ["GRAFANA_URL" ]}
54
- if "GRAFANA_TOKEN" in os .environ :
55
- params .update ({"token" : os .environ ["GRAFANA_TOKEN" ]})
56
- elif config is not None :
53
+ params .update ({"url" : url or os .environ ["GRAFANA_URL" ]})
54
+ if "GRAFANA_TOKEN" in os .environ :
55
+ params .update ({"token" : os .environ ["GRAFANA_TOKEN" ]})
56
+
57
+ if not params and config is not None and label is not None :
57
58
params = grafana_settings_from_config_section (config = config , label = label )
58
59
59
60
# Additional application parameters.
60
- params .update (
61
- {
62
- "search_api_limit" : config .get ("grafana" , {}).get ("search_api_limit" , 5000 ),
63
- "folder" : config .get ("general" , {}).get ("grafana_folder" , "General" ),
64
- }
65
- )
61
+ if config is not None :
62
+ params .update (
63
+ {
64
+ "search_api_limit" : config .get ("grafana" , {}).get ("search_api_limit" , 5000 ),
65
+ "folder" : config .get ("general" , {}).get ("grafana_folder" , "General" ),
66
+ }
67
+ )
66
68
return params
67
69
68
70
You can’t perform that action at this time.
0 commit comments