Skip to content

Commit

Permalink
Merge pull request #2040 from SEKOIA-IO/fix/IntakeDocumentationRedire…
Browse files Browse the repository at this point in the history
…ction

Integration redirection: allow redirect to a same documentation from several formats
  • Loading branch information
squioc authored Oct 7, 2024
2 parents de37123 + 6acceb8 commit 2b7132a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
uuid: bba2bed2-d925-440f-a0ce-dbcae04eaf26
uuid: bba2bed2-d925-440f-a0ce-dbcae04eaf26,2f28e4f9-a4f3-40a6-9909-b69f3df32535
name: Gatewatcher AionIQ
type: intake

Expand Down Expand Up @@ -73,4 +73,4 @@ This setup guide will show you how to forward your Gatewatcher AionIQ logs to Se

## Further readings

- [GCenter Syslog configuration overview](https://docs.gatewatcher.com/en/gcenter/2.5.3/101)
- [GCenter Syslog configuration overview](https://docs.gatewatcher.com/en/gcenter/2.5.3/101)
37 changes: 19 additions & 18 deletions plugins/intakes_by_uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,25 @@ def on_files(self, files: Files, config: Config):
if "uuid" not in metadata or metadata.get("type").lower() != "intake":
continue

dialect_uuid = metadata["uuid"]

self._redirection_table[dialect_uuid] = source_file.url
self._integrations.append(
{
"uuid": dialect_uuid,
"name": metadata.get("name"),
"destination": source_file.url,
}
)

newfile = File(
path=f"operation_center/integration_catalog/uuid/{dialect_uuid}.md",
src_dir="operation_center/integration_catalog/uuid",
dest_dir=config["site_dir"],
use_directory_urls=True,
)
new_files.append(newfile)
dialect_uuids = (uuid.strip() for uuid in metadata["uuid"].split(","))

for dialect_uuid in dialect_uuids:
self._redirection_table[dialect_uuid] = source_file.url
self._integrations.append(
{
"uuid": dialect_uuid,
"name": metadata.get("name"),
"destination": source_file.url,
}
)

newfile = File(
path=f"operation_center/integration_catalog/uuid/{dialect_uuid}.md",
src_dir="operation_center/integration_catalog/uuid",
dest_dir=config["site_dir"],
use_directory_urls=True,
)
new_files.append(newfile)

new_files.append(File(
path="integration/categories/index.md",
Expand Down

0 comments on commit 2b7132a

Please sign in to comment.