Commit 066facae authored by jan.koester's avatar jan.koester
Browse files

deb

parent 0ee6032b
Loading
Loading
Loading
Loading

architecture.mmd

0 → 100644
+40 −0
Original line number Diff line number Diff line
graph TD
    Client([Client / Browser]) --> Ingress(Kubernetes Ingress / Load Balancer)

    Ingress --> svc_blogi{{Blogi Service / Load Balancer}}

    svc_blogi --> blogi1
    svc_blogi --> blogi2
    svc_blogi --> blogi3

    subgraph Stack 1
        blogi1(Blogi Pod 1)
        auth1[(AuthDB Pod 1)]
        media1[(MediaDB Pod 1)]
        blogi1 -->|exklusiv| auth1
        blogi1 -->|exklusiv| media1
    end

    subgraph Stack 2
        blogi2(Blogi Pod 2)
        auth2[(AuthDB Pod 2)]
        media2[(MediaDB Pod 2)]
        blogi2 -->|exklusiv| auth2
        blogi2 -->|exklusiv| media2
    end

    subgraph Stack 3
        blogi3(Blogi Pod 3)
        auth3[(AuthDB Pod 3)]
        media3[(MediaDB Pod 3)]
        blogi3 -->|exklusiv| auth3
        blogi3 -->|exklusiv| media3
    end

    classDef service fill:#f9f,stroke:#333,stroke-width:2px;
    classDef pod fill:#bbf,stroke:#333,stroke-width:1px;
    classDef db fill:#fbf,stroke:#333,stroke-width:1px;

    class svc_blogi service;
    class blogi1,blogi2,blogi3 pod;
    class auth1,auth2,auth3,media1,media2,media3 db;
 No newline at end of file

architecture.svg

0 → 100644
+1 −0

File added.

Preview size limit exceeded, changes collapsed.

fix_bools.py

0 → 100644
+16 −0
Original line number Diff line number Diff line
import glob
import re

files = glob.glob('editor/widgets/**/*.cpp', recursive=True)
for file in files:
    with open(file, 'r') as f:
        content = f.read()

    bool_parse = r'if (json_object_is_type(val_obj, json_type_string)) {\n                        const char *s = json_object_get_string(val_obj);\n                        \1 = (s && (strcmp(s, "true") == 0 || strcmp(s, "1") == 0));\n                    } else {\n                        \1 = json_object_get_boolean(val_obj);\n                    }'
    
    content = re.sub(r'([a-zA-Z0-9_]+)\s*=\s*json_object_get_boolean\(val_obj\);', bool_parse, content)

    with open(file, 'w') as f:
        f.write(content)
        
    print(f"Patched {file}")

parse_bool.h

0 → 100644
+15 −0
Original line number Diff line number Diff line
#pragma once
#include <json-c/json.h>
#include <cstring>

inline bool ext_json_object_get_boolean(json_object *obj) {
    if (!obj) return false;
    if (json_object_is_type(obj, json_type_string)) {
        const char *s = json_object_get_string(obj);
        if (s && (strcmp(s, "true") == 0 || strcmp(s, "1") == 0)) {
            return true;
        }
        return false;
    }
    return json_object_get_boolean(obj);
}

test_get_bool

0 → 100755
+15.8 KiB

File added.

No diff preview for this file type.

Loading