Skip to content

Commit

Permalink
Add Saas v2 (#89) (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-tessier authored May 26, 2020
1 parent f8ba6a8 commit eddeb38
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 3 deletions.
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
app_root_dir="diagrams"

# NOTE: azure icon set is not latest version
providers=("onprem" "aws" "azure" "gcp" "firebase" "k8s" "alibabacloud" "oci" "programming")
providers=("onprem" "aws" "azure" "gcp" "firebase" "k8s" "alibabacloud" "oci" "programming" "saas")

if ! [ -x "$(command -v round)" ]; then
echo 'round is not installed'
Expand Down
4 changes: 3 additions & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DIR_RESOURCE = "resources"
DIR_TEMPLATE = "templates"

PROVIDERS = ("base", "onprem", "aws", "azure", "gcp", "firebase", "k8s", "alibabacloud", "oci", "programming")
PROVIDERS = ("base", "onprem", "aws", "azure", "gcp", "firebase", "k8s", "alibabacloud", "oci", "programming", "saas")

#########################
# Resource Processing #
Expand All @@ -34,6 +34,7 @@
"alibabacloud": (),
"oci": ("OCI-",),
"programming": (),
"saas": (),
}

#########################
Expand Down Expand Up @@ -354,4 +355,5 @@
"Typescript": "TypeScript"
},
},
"saas": {},
}
12 changes: 12 additions & 0 deletions diagrams/saas/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""
Saas provides a set of general saas services.
"""

from diagrams import Node


class _Saas(Node):
_provider = "saas"
_icon_dir = "resources/saas"

fontcolor = "#ffffff"
19 changes: 19 additions & 0 deletions diagrams/saas/chat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.

from . import _Saas


class _Chat(_Saas):
_type = "chat"
_icon_dir = "resources/saas/chat"


class Slack(_Chat):
_icon = "slack.png"


class Telegram(_Chat):
_icon = "telegram.png"


# Aliases
19 changes: 19 additions & 0 deletions diagrams/saas/social.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.

from . import _Saas


class _Social(_Saas):
_type = "social"
_icon_dir = "resources/saas/social"


class Facebook(_Social):
_icon = "facebook.png"


class Twitter(_Social):
_icon = "twitter.png"


# Aliases
16 changes: 16 additions & 0 deletions docs/nodes/saas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
id: saas
title: Saas
---

Node classes list of saas provider.

## saas.chat

- **diagrams.saas.chat.Slack**
- **diagrams.saas.chat.Telegram**

## saas.social

- **diagrams.saas.social.Facebook**
- **diagrams.saas.social.Twitter**
Binary file added resources/saas/chat/slack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/saas/chat/telegram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/saas/social/facebook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/saas/social/twitter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scripts/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import config as cfg
from . import app_root_dir, doc_root_dir, resource_dir, template_dir

_usage = "Usage: generate.py <onprem|aws|gcp|azure|k8s|alibabacloud|oci|programming>"
_usage = "Usage: generate.py <onprem|aws|gcp|azure|k8s|alibabacloud|oci|programming|saas>"


def load_tmpl(tmpl: str) -> Template:
Expand Down
5 changes: 5 additions & 0 deletions scripts/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ def cleaner_programming(f):
return f.lower()


def cleaner_saas(f):
return f.lower()


cleaners = {
"onprem": cleaner_onprem,
"aws": cleaner_aws,
Expand All @@ -104,6 +108,7 @@ def cleaner_programming(f):
"alibabacloud": cleaner_alibabacloud,
"oci": cleaner_oci,
"programming": cleaner_programming,
"saas": cleaner_saas,
}


Expand Down

0 comments on commit eddeb38

Please sign in to comment.