-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import json | ||
from grafana_backup.dashboardApi import update_folder_permissions | ||
|
||
|
||
def main(args, settings, file_path): | ||
grafana_url = settings.get('GRAFANA_URL') | ||
http_post_headers = settings.get('HTTP_POST_HEADERS') | ||
verify_ssl = settings.get('VERIFY_SSL') | ||
client_cert = settings.get('CLIENT_CERT') | ||
debug = settings.get('DEBUG') | ||
|
||
with open(file_path, 'r') as f: | ||
data = f.read() | ||
|
||
folder_permissions = json.loads(data) | ||
if folder_permissions: | ||
result = update_folder_permissions(folder_permissions, grafana_url, http_post_headers, verify_ssl, client_cert, debug) | ||
print("update folder permissions {0}, status: {1}, msg: {2}".format(folder_permissions[0].get('title', ''), result[0], result[1])) |
wish I would have noticed this sooner but it appears this function is unused and added by @jartigag any reason this can't be deleted?