diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:19:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:19:22 +0000 |
commit | c21c3b0befeb46a51b6bf3758ffa30813bea0ff0 (patch) | |
tree | 9754ff1ca740f6346cf8483ec915d4054bc5da2d /integrations/gen_docs_integrations.py | |
parent | Adding upstream version 1.43.2. (diff) | |
download | netdata-c21c3b0befeb46a51b6bf3758ffa30813bea0ff0.tar.xz netdata-c21c3b0befeb46a51b6bf3758ffa30813bea0ff0.zip |
Adding upstream version 1.44.3.upstream/1.44.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'integrations/gen_docs_integrations.py')
-rw-r--r-- | integrations/gen_docs_integrations.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/integrations/gen_docs_integrations.py b/integrations/gen_docs_integrations.py index d8006dd2a..2b27db859 100644 --- a/integrations/gen_docs_integrations.py +++ b/integrations/gen_docs_integrations.py @@ -97,7 +97,7 @@ def clean_string(string): The string represents an integration name, as it would be displayed in the final text """ - return string.lower().replace(" ", "_").replace("/", "-").replace("(", "").replace(")", "") + return string.lower().replace(" ", "_").replace("/", "-").replace("(", "").replace(")", "").replace(":", "") def read_integrations_js(path_to_file): @@ -146,14 +146,16 @@ def build_readme_from_integration(integration, mode=''): sidebar_label = integration['meta']['monitored_instance']['name'] learn_rel_path = generate_category_from_name( integration['meta']['monitored_instance']['categories'][0].split("."), categories) - # build the markdown string + most_popular = integration['meta']['most_popular'] + # build the markdown string md = \ f"""<!--startmeta meta_yaml: "{meta_yaml}" sidebar_label: "{sidebar_label}" learn_status: "Published" learn_rel_path: "{learn_rel_path}" +most_popular: {most_popular} message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE" endmeta--> @@ -256,7 +258,7 @@ endmeta--> def build_path(meta_yaml_link): """ - funtion that takes a metadata yaml file link, and makes it into a path that gets used to write to a file. + function that takes a metadata yaml file link, and makes it into a path that gets used to write to a file. """ return meta_yaml_link.replace("https://github.com/netdata/", "") \ .split("/", 1)[1] \ |