@cryptotaxi247 / netdata-1 / commits / 636293628

bugfix for logs integrations (#18800)

Fotis Voutsas committed Oct 17, 2024 at 12:08 UTC 6362936280685a940047164563d45cf25379a6a3
1 file changed +5 -4
integrations/gen_docs_integrations.py
+5 -4
@@ -90,12 +90,12 @@ def add_custom_edit_url(markdown_string, meta_yaml_link, sidebar_label_string, m
90 elif mode == 'agent-notification':
91 path_to_md_file = meta_yaml_link.replace("metadata.yaml", "README")
92
93 - elif mode == 'logs':
94 - path_to_md_file = meta_yaml_link.replace("metadata.yaml", "README")
95 -
93 elif mode == 'cloud-authentication':
94 path_to_md_file = meta_yaml_link.replace("metadata.yaml", f'integrations/{clean_string(sidebar_label_string)}')
95
96 + elif mode == 'logs':
97 + path_to_md_file = meta_yaml_link.replace("metadata.yaml", f'integrations/{clean_string(sidebar_label_string)}')
98 +
99 output = markdown_string.replace(
100 "<!--startmeta",
101 f'<!--startmeta\ncustom_edit_url: \"{path_to_md_file}.md\"')
@@ -454,6 +454,8 @@ def write_to_file(path, md, meta_yaml, sidebar_label, community, mode='default')
454 print("Exception in writing to file", e)
455 elif mode == 'logs':
456
457 + # for logs we generate them near their metadata.yaml
458 +
459 name = clean_string(integration['meta']['name'])
460
461 if not Path(f'{path}/integrations').exists():
@@ -471,7 +473,6 @@ def write_to_file(path, md, meta_yaml, sidebar_label, community, mode='default')
473 md,
474 Path(finalpath)
475 )
474 -
476 except FileNotFoundError as e:
477 print("Exception in writing to file", e)
478 elif mode == 'authentication':