Spaces:
Running
Running
Update sample_data.py
Browse files- sample_data.py +34 -126
sample_data.py
CHANGED
|
@@ -1126,134 +1126,42 @@ BINARY_TREE_JSON = """
|
|
| 1126 |
NETWORK_GRAPH_JSON = """
|
| 1127 |
{
|
| 1128 |
"nodes": [
|
| 1129 |
-
{
|
| 1130 |
-
|
| 1131 |
-
|
| 1132 |
-
|
| 1133 |
-
|
| 1134 |
-
},
|
| 1135 |
-
{
|
| 1136 |
-
|
| 1137 |
-
|
| 1138 |
-
|
| 1139 |
-
|
| 1140 |
-
},
|
| 1141 |
-
{
|
| 1142 |
-
|
| 1143 |
-
|
| 1144 |
-
|
| 1145 |
-
|
| 1146 |
-
},
|
| 1147 |
-
{
|
| 1148 |
-
"id": "order_service",
|
| 1149 |
-
"label": "Order Service",
|
| 1150 |
-
"type": "service",
|
| 1151 |
-
"depth": 2
|
| 1152 |
-
},
|
| 1153 |
-
{
|
| 1154 |
-
"id": "payment_service",
|
| 1155 |
-
"label": "Payment Service",
|
| 1156 |
-
"type": "service",
|
| 1157 |
-
"depth": 2
|
| 1158 |
-
},
|
| 1159 |
-
{
|
| 1160 |
-
"id": "user_db",
|
| 1161 |
-
"label": "User Database",
|
| 1162 |
-
"type": "database",
|
| 1163 |
-
"depth": 3
|
| 1164 |
-
},
|
| 1165 |
-
{
|
| 1166 |
-
"id": "order_db",
|
| 1167 |
-
"label": "Order Database",
|
| 1168 |
-
"type": "database",
|
| 1169 |
-
"depth": 3
|
| 1170 |
-
},
|
| 1171 |
-
{
|
| 1172 |
-
"id": "cache_redis",
|
| 1173 |
-
"label": "Redis Cache",
|
| 1174 |
-
"type": "database",
|
| 1175 |
-
"depth": 1
|
| 1176 |
-
},
|
| 1177 |
-
{
|
| 1178 |
-
"id": "mobile_app",
|
| 1179 |
-
"label": "Mobile App",
|
| 1180 |
-
"type": "user",
|
| 1181 |
-
"depth": 0
|
| 1182 |
-
},
|
| 1183 |
-
{
|
| 1184 |
-
"id": "admin_panel",
|
| 1185 |
-
"label": "Admin Panel",
|
| 1186 |
-
"type": "user",
|
| 1187 |
-
"depth": 0
|
| 1188 |
-
}
|
| 1189 |
],
|
| 1190 |
"connections": [
|
| 1191 |
-
{
|
| 1192 |
-
|
| 1193 |
-
|
| 1194 |
-
|
| 1195 |
-
|
| 1196 |
-
},
|
| 1197 |
-
{
|
| 1198 |
-
|
| 1199 |
-
|
| 1200 |
-
|
| 1201 |
-
|
| 1202 |
-
},
|
| 1203 |
-
{
|
| 1204 |
-
|
| 1205 |
-
|
| 1206 |
-
|
| 1207 |
-
|
| 1208 |
-
},
|
| 1209 |
-
{
|
| 1210 |
-
"from": "api_gateway",
|
| 1211 |
-
"to": "user_service",
|
| 1212 |
-
"label": "gRPC",
|
| 1213 |
-
"weight": 3
|
| 1214 |
-
},
|
| 1215 |
-
{
|
| 1216 |
-
"from": "api_gateway",
|
| 1217 |
-
"to": "order_service",
|
| 1218 |
-
"label": "gRPC",
|
| 1219 |
-
"weight": 3
|
| 1220 |
-
},
|
| 1221 |
-
{
|
| 1222 |
-
"from": "api_gateway",
|
| 1223 |
-
"to": "payment_service",
|
| 1224 |
-
"label": "gRPC",
|
| 1225 |
-
"weight": 2
|
| 1226 |
-
},
|
| 1227 |
-
{
|
| 1228 |
-
"from": "user_service",
|
| 1229 |
-
"to": "user_db",
|
| 1230 |
-
"label": "SQL",
|
| 1231 |
-
"weight": 4
|
| 1232 |
-
},
|
| 1233 |
-
{
|
| 1234 |
-
"from": "order_service",
|
| 1235 |
-
"to": "order_db",
|
| 1236 |
-
"label": "SQL",
|
| 1237 |
-
"weight": 4
|
| 1238 |
-
},
|
| 1239 |
-
{
|
| 1240 |
-
"from": "order_service",
|
| 1241 |
-
"to": "payment_service",
|
| 1242 |
-
"label": "REST",
|
| 1243 |
-
"weight": 2
|
| 1244 |
-
},
|
| 1245 |
-
{
|
| 1246 |
-
"from": "user_service",
|
| 1247 |
-
"to": "cache_redis",
|
| 1248 |
-
"label": "Cache",
|
| 1249 |
-
"weight": 3
|
| 1250 |
-
},
|
| 1251 |
-
{
|
| 1252 |
-
"from": "order_service",
|
| 1253 |
-
"to": "cache_redis",
|
| 1254 |
-
"label": "Cache",
|
| 1255 |
-
"weight": 2
|
| 1256 |
-
}
|
| 1257 |
]
|
| 1258 |
}
|
| 1259 |
"""
|
|
|
|
| 1126 |
NETWORK_GRAPH_JSON = """
|
| 1127 |
{
|
| 1128 |
"nodes": [
|
| 1129 |
+
{"id": "customers", "label": "Customers", "type": "user"},
|
| 1130 |
+
{"id": "sellers", "label": "Sellers", "type": "user"},
|
| 1131 |
+
{"id": "admin", "label": "Admin", "type": "user"},
|
| 1132 |
+
{"id": "web_frontend", "label": "Web Frontend", "type": "server"},
|
| 1133 |
+
{"id": "product_service", "label": "Product Service", "type": "service"},
|
| 1134 |
+
{"id": "cart_service", "label": "Cart Service", "type": "service"},
|
| 1135 |
+
{"id": "order_service", "label": "Order Service", "type": "service"},
|
| 1136 |
+
{"id": "payment_service", "label": "Payment Service", "type": "service"},
|
| 1137 |
+
{"id": "inventory_tracker", "label": "Inventory Tracker", "type": "service"},
|
| 1138 |
+
{"id": "review_system", "label": "Review System", "type": "service"},
|
| 1139 |
+
{"id": "email_sender", "label": "Email Sender", "type": "service"},
|
| 1140 |
+
{"id": "image_uploader", "label": "Image Uploader", "type": "service"},
|
| 1141 |
+
{"id": "product_db", "label": "Product Database", "type": "database"},
|
| 1142 |
+
{"id": "user_db", "label": "User Database", "type": "database"},
|
| 1143 |
+
{"id": "order_db", "label": "Order Database", "type": "database"},
|
| 1144 |
+
{"id": "image_storage", "label": "Image Storage", "type": "database"},
|
| 1145 |
+
{"id": "stripe_api", "label": "Stripe API", "type": "service"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1146 |
],
|
| 1147 |
"connections": [
|
| 1148 |
+
{"from": "customers", "to": "web_frontend", "label": "Browse", "weight": 5},
|
| 1149 |
+
{"from": "sellers", "to": "web_frontend", "label": "Manage Store", "weight": 3},
|
| 1150 |
+
{"from": "admin", "to": "web_frontend", "label": "Admin Panel", "weight": 2},
|
| 1151 |
+
{"from": "web_frontend", "to": "product_service", "label": "Get Products", "weight": 4},
|
| 1152 |
+
{"from": "web_frontend", "to": "cart_service", "label": "Cart Actions", "weight": 4},
|
| 1153 |
+
{"from": "web_frontend", "to": "order_service", "label": "Place Order", "weight": 3},
|
| 1154 |
+
{"from": "product_service", "to": "product_db", "label": "Product Data", "weight": 4},
|
| 1155 |
+
{"from": "product_service", "to": "review_system", "label": "Product Reviews", "weight": 2},
|
| 1156 |
+
{"from": "cart_service", "to": "inventory_tracker", "label": "Check Stock", "weight": 3},
|
| 1157 |
+
{"from": "order_service", "to": "order_db", "label": "Store Order", "weight": 4},
|
| 1158 |
+
{"from": "order_service", "to": "payment_service", "label": "Process Payment", "weight": 4},
|
| 1159 |
+
{"from": "order_service", "to": "email_sender", "label": "Order Confirmation", "weight": 2},
|
| 1160 |
+
{"from": "payment_service", "to": "stripe_api", "label": "Charge Card", "weight": 4},
|
| 1161 |
+
{"from": "inventory_tracker", "to": "product_db", "label": "Update Stock", "weight": 3},
|
| 1162 |
+
{"from": "review_system", "to": "user_db", "label": "User Reviews", "weight": 2},
|
| 1163 |
+
{"from": "sellers", "to": "image_uploader", "label": "Upload Images", "weight": 2},
|
| 1164 |
+
{"from": "image_uploader", "to": "image_storage", "label": "Store Images", "weight": 3}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1165 |
]
|
| 1166 |
}
|
| 1167 |
"""
|