Browse Source

Add Saas v2 (#89) (#173)

pull/179/head
gabriel-tessier 4 years ago
committed by GitHub
parent
commit
eddeb38352
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 76 additions and 3 deletions
  1. +1
    -1
      autogen.sh
  2. +3
    -1
      config.py
  3. +12
    -0
      diagrams/saas/__init__.py
  4. +19
    -0
      diagrams/saas/chat.py
  5. +19
    -0
      diagrams/saas/social.py
  6. +16
    -0
      docs/nodes/saas.md
  7. BIN
      resources/saas/chat/slack.png
  8. BIN
      resources/saas/chat/telegram.png
  9. BIN
      resources/saas/social/facebook.png
  10. BIN
      resources/saas/social/twitter.png
  11. +1
    -1
      scripts/generate.py
  12. +5
    -0
      scripts/resource.py

+ 1
- 1
autogen.sh View File

@@ -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'


+ 3
- 1
config.py View File

@@ -11,7 +11,7 @@ DIR_APP_ROOT = "diagrams"
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 #
@@ -34,6 +34,7 @@ FILE_PREFIXES = {
"alibabacloud": (),
"oci": ("OCI-",),
"programming": (),
"saas": (),
}

#########################
@@ -354,4 +355,5 @@ ALIASES = {
"Typescript": "TypeScript"
},
},
"saas": {},
}

+ 12
- 0
diagrams/saas/__init__.py View File

@@ -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
- 0
diagrams/saas/chat.py View File

@@ -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
- 0
diagrams/saas/social.py View File

@@ -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
- 0
docs/nodes/saas.md View File

@@ -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**

BIN
resources/saas/chat/slack.png View File

Before After
Width: 256  |  Height: 256  |  Size: 17 KiB

BIN
resources/saas/chat/telegram.png View File

Before After
Width: 256  |  Height: 256  |  Size: 9.1 KiB

BIN
resources/saas/social/facebook.png View File

Before After
Width: 256  |  Height: 256  |  Size: 15 KiB

BIN
resources/saas/social/twitter.png View File

Before After
Width: 256  |  Height: 256  |  Size: 10 KiB

+ 1
- 1
scripts/generate.py View File

@@ -7,7 +7,7 @@ from jinja2 import Environment, FileSystemLoader, Template
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:


+ 5
- 0
scripts/resource.py View File

@@ -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,
@@ -104,6 +108,7 @@ cleaners = {
"alibabacloud": cleaner_alibabacloud,
"oci": cleaner_oci,
"programming": cleaner_programming,
"saas": cleaner_saas,
}




Loading…
Cancel
Save