Spaces:
Running
Running
Update sample_data.py
Browse files- sample_data.py +135 -0
sample_data.py
CHANGED
@@ -1121,4 +1121,139 @@ BINARY_TREE_JSON = """
|
|
1121 |
}
|
1122 |
}
|
1123 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1124 |
"""
|
|
|
1121 |
}
|
1122 |
}
|
1123 |
}
|
1124 |
+
"""
|
1125 |
+
|
1126 |
+
NETWORK_GRAPH_JSON = """
|
1127 |
+
{
|
1128 |
+
"nodes": [
|
1129 |
+
{
|
1130 |
+
"id": "web_server",
|
1131 |
+
"label": "Web Server",
|
1132 |
+
"type": "server",
|
1133 |
+
"depth": 0
|
1134 |
+
},
|
1135 |
+
{
|
1136 |
+
"id": "api_gateway",
|
1137 |
+
"label": "API Gateway",
|
1138 |
+
"type": "service",
|
1139 |
+
"depth": 1
|
1140 |
+
},
|
1141 |
+
{
|
1142 |
+
"id": "user_service",
|
1143 |
+
"label": "User Service",
|
1144 |
+
"type": "service",
|
1145 |
+
"depth": 2
|
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 |
+
"from": "mobile_app",
|
1193 |
+
"to": "api_gateway",
|
1194 |
+
"label": "HTTPS",
|
1195 |
+
"weight": 3
|
1196 |
+
},
|
1197 |
+
{
|
1198 |
+
"from": "admin_panel",
|
1199 |
+
"to": "api_gateway",
|
1200 |
+
"label": "HTTPS",
|
1201 |
+
"weight": 2
|
1202 |
+
},
|
1203 |
+
{
|
1204 |
+
"from": "web_server",
|
1205 |
+
"to": "api_gateway",
|
1206 |
+
"label": "Internal",
|
1207 |
+
"weight": 4
|
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 |
"""
|