Skip to content

Commit eddeb38

Browse files
Add Saas v2 (#89) (#173)
1 parent f8ba6a8 commit eddeb38

File tree

12 files changed

+76
-3
lines changed

12 files changed

+76
-3
lines changed

autogen.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
app_root_dir="diagrams"
55

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

99
if ! [ -x "$(command -v round)" ]; then
1010
echo 'round is not installed'

config.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DIR_RESOURCE = "resources"
1212
DIR_TEMPLATE = "templates"
1313

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

1616
#########################
1717
# Resource Processing #
@@ -34,6 +34,7 @@
3434
"alibabacloud": (),
3535
"oci": ("OCI-",),
3636
"programming": (),
37+
"saas": (),
3738
}
3839

3940
#########################
@@ -354,4 +355,5 @@
354355
"Typescript": "TypeScript"
355356
},
356357
},
358+
"saas": {},
357359
}

diagrams/saas/__init__.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""
2+
Saas provides a set of general saas services.
3+
"""
4+
5+
from diagrams import Node
6+
7+
8+
class _Saas(Node):
9+
_provider = "saas"
10+
_icon_dir = "resources/saas"
11+
12+
fontcolor = "#ffffff"

diagrams/saas/chat.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This module is automatically generated by autogen.sh. DO NOT EDIT.
2+
3+
from . import _Saas
4+
5+
6+
class _Chat(_Saas):
7+
_type = "chat"
8+
_icon_dir = "resources/saas/chat"
9+
10+
11+
class Slack(_Chat):
12+
_icon = "slack.png"
13+
14+
15+
class Telegram(_Chat):
16+
_icon = "telegram.png"
17+
18+
19+
# Aliases

diagrams/saas/social.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This module is automatically generated by autogen.sh. DO NOT EDIT.
2+
3+
from . import _Saas
4+
5+
6+
class _Social(_Saas):
7+
_type = "social"
8+
_icon_dir = "resources/saas/social"
9+
10+
11+
class Facebook(_Social):
12+
_icon = "facebook.png"
13+
14+
15+
class Twitter(_Social):
16+
_icon = "twitter.png"
17+
18+
19+
# Aliases

docs/nodes/saas.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
id: saas
3+
title: Saas
4+
---
5+
6+
Node classes list of saas provider.
7+
8+
## saas.chat
9+
10+
- **diagrams.saas.chat.Slack**
11+
- **diagrams.saas.chat.Telegram**
12+
13+
## saas.social
14+
15+
- **diagrams.saas.social.Facebook**
16+
- **diagrams.saas.social.Twitter**

resources/saas/chat/slack.png

17.4 KB
Loading

resources/saas/chat/telegram.png

9.11 KB
Loading

resources/saas/social/facebook.png

14.6 KB
Loading

resources/saas/social/twitter.png

10 KB
Loading

scripts/generate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import config as cfg
88
from . import app_root_dir, doc_root_dir, resource_dir, template_dir
99

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

1212

1313
def load_tmpl(tmpl: str) -> Template:

scripts/resource.py

+5
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ def cleaner_programming(f):
9494
return f.lower()
9595

9696

97+
def cleaner_saas(f):
98+
return f.lower()
99+
100+
97101
cleaners = {
98102
"onprem": cleaner_onprem,
99103
"aws": cleaner_aws,
@@ -104,6 +108,7 @@ def cleaner_programming(f):
104108
"alibabacloud": cleaner_alibabacloud,
105109
"oci": cleaner_oci,
106110
"programming": cleaner_programming,
111+
"saas": cleaner_saas,
107112
}
108113

109114

0 commit comments

Comments
 (0)