fastapi-voyager 0.10.2__py3-none-any.whl → 0.10.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fastapi_voyager/filter.py +1 -1
- fastapi_voyager/version.py +1 -1
- fastapi_voyager/voyager.py +15 -4
- fastapi_voyager/web/index.html +2 -2
- fastapi_voyager/web/vue-main.js +9 -4
- {fastapi_voyager-0.10.2.dist-info → fastapi_voyager-0.10.3.dist-info}/METADATA +5 -1
- {fastapi_voyager-0.10.2.dist-info → fastapi_voyager-0.10.3.dist-info}/RECORD +10 -10
- {fastapi_voyager-0.10.2.dist-info → fastapi_voyager-0.10.3.dist-info}/WHEEL +0 -0
- {fastapi_voyager-0.10.2.dist-info → fastapi_voyager-0.10.3.dist-info}/entry_points.txt +0 -0
- {fastapi_voyager-0.10.2.dist-info → fastapi_voyager-0.10.3.dist-info}/licenses/LICENSE +0 -0
fastapi_voyager/filter.py
CHANGED
fastapi_voyager/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__all__ = ["__version__"]
|
|
2
|
-
__version__ = "0.10.
|
|
2
|
+
__version__ = "0.10.3"
|
fastapi_voyager/voyager.py
CHANGED
|
@@ -14,7 +14,7 @@ from fastapi_voyager.type_helper import (
|
|
|
14
14
|
)
|
|
15
15
|
from pydantic import BaseModel
|
|
16
16
|
from fastapi_voyager.type import Route, SchemaNode, Link, Tag, LinkType, FieldType, PK, CoreData
|
|
17
|
-
from fastapi_voyager.filter import filter_graph,
|
|
17
|
+
from fastapi_voyager.filter import filter_graph, filter_subgraph_by_module_prefix
|
|
18
18
|
from fastapi_voyager.render import Renderer
|
|
19
19
|
import pydantic_resolve.constant as const
|
|
20
20
|
|
|
@@ -308,14 +308,25 @@ class Voyager:
|
|
|
308
308
|
return renderer.render_dot(_tags, _routes, _nodes, _links)
|
|
309
309
|
|
|
310
310
|
def render_brief_dot(self, module_prefix: str | None = None):
|
|
311
|
-
_tags, _routes, _nodes, _links =
|
|
312
|
-
|
|
311
|
+
_tags, _routes, _nodes, _links = filter_graph(
|
|
312
|
+
schema=self.schema,
|
|
313
|
+
schema_field=self.schema_field,
|
|
313
314
|
tags=self.tags,
|
|
314
315
|
routes=self.routes,
|
|
315
316
|
nodes=self.nodes,
|
|
316
317
|
links=self.links,
|
|
318
|
+
node_set=self.node_set,
|
|
319
|
+
)
|
|
320
|
+
|
|
321
|
+
_tags, _routes, _nodes, _links = filter_subgraph_by_module_prefix(
|
|
322
|
+
module_prefix=module_prefix,
|
|
323
|
+
tags=_tags,
|
|
324
|
+
routes=_routes,
|
|
325
|
+
nodes=_nodes,
|
|
326
|
+
links=_links,
|
|
317
327
|
)
|
|
318
|
-
|
|
328
|
+
|
|
329
|
+
renderer = Renderer(show_fields=self.show_fields, module_color=self.module_color, schema=self.schema)
|
|
319
330
|
|
|
320
331
|
_tags, _routes, _links = self.handle_hide(_tags, _routes, _links)
|
|
321
332
|
return renderer.render_dot(_tags, _routes, _nodes, _links, True)
|
fastapi_voyager/web/index.html
CHANGED
|
@@ -152,7 +152,6 @@
|
|
|
152
152
|
shift + click to see schema's dependencies without
|
|
153
153
|
unrelated nodes
|
|
154
154
|
</li>
|
|
155
|
-
<li>alt + click to see schema details</li>
|
|
156
155
|
</ul>
|
|
157
156
|
</div>
|
|
158
157
|
</q-tooltip>
|
|
@@ -286,7 +285,8 @@
|
|
|
286
285
|
v-show="schemaCodeName"
|
|
287
286
|
@update:model-value="val => onFocusChange(val)"
|
|
288
287
|
label="Focus"
|
|
289
|
-
|
|
288
|
+
title="pick a schema and toggle focus on to display related nodes only"
|
|
289
|
+
style="position: absolute; left: 8px; bottom: 8px; z-index: 10; background: rgba(255,255,255,0.85); border-radius: 4px; padding: 2px 8px;"
|
|
290
290
|
size="sm"
|
|
291
291
|
/>
|
|
292
292
|
</div>
|
fastapi_voyager/web/vue-main.js
CHANGED
|
@@ -93,7 +93,6 @@ const app = createApp({
|
|
|
93
93
|
await onGenerate(false, null)
|
|
94
94
|
setTimeout(() => {
|
|
95
95
|
const ele = $(`[data-name='${schemaCodeName.value}'] polygon`)
|
|
96
|
-
debugger
|
|
97
96
|
ele.click()
|
|
98
97
|
}, 1)
|
|
99
98
|
}
|
|
@@ -121,11 +120,13 @@ const app = createApp({
|
|
|
121
120
|
const graphUI = new GraphUI("#graph", {
|
|
122
121
|
onSchemaShiftClick: (id) => {
|
|
123
122
|
if (state.rawSchemas.has(id)) {
|
|
123
|
+
resetDetailPanels()
|
|
124
124
|
schemaFieldFilterSchema.value = id;
|
|
125
125
|
showSchemaFieldFilter.value = true;
|
|
126
126
|
}
|
|
127
127
|
},
|
|
128
128
|
onSchemaClick: (id) => {
|
|
129
|
+
resetDetailPanels()
|
|
129
130
|
if (state.rawSchemas.has(id)) {
|
|
130
131
|
schemaCodeName.value = id;
|
|
131
132
|
state.detailDrawer = true;
|
|
@@ -136,9 +137,7 @@ const app = createApp({
|
|
|
136
137
|
}
|
|
137
138
|
},
|
|
138
139
|
resetCb: () => {
|
|
139
|
-
|
|
140
|
-
showRouteDetail.value = false;
|
|
141
|
-
schemaCodeName.value = ''
|
|
140
|
+
resetDetailPanels()
|
|
142
141
|
}
|
|
143
142
|
});
|
|
144
143
|
|
|
@@ -212,6 +211,12 @@ const app = createApp({
|
|
|
212
211
|
showSchemaFieldFilter.value = true;
|
|
213
212
|
}
|
|
214
213
|
|
|
214
|
+
function resetDetailPanels() {
|
|
215
|
+
state.detailDrawer = false
|
|
216
|
+
showRouteDetail.value = false;
|
|
217
|
+
schemaCodeName.value = ''
|
|
218
|
+
}
|
|
219
|
+
|
|
215
220
|
async function onReset() {
|
|
216
221
|
state.tag = null;
|
|
217
222
|
state.routeId = "";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastapi-voyager
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.3
|
|
4
4
|
Summary: Visualize FastAPI application's routing tree and dependencies
|
|
5
5
|
Project-URL: Homepage, https://github.com/allmonday/fastapi-voyager
|
|
6
6
|
Project-URL: Source, https://github.com/allmonday/fastapi-voyager
|
|
@@ -236,6 +236,10 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
236
236
|
- 0.10.2
|
|
237
237
|
- [x] fix graph height
|
|
238
238
|
- [x] show version in title
|
|
239
|
+
- 0.10.3
|
|
240
|
+
- [x] fix focus in brief-mode
|
|
241
|
+
- [x] ui: adjust focus position
|
|
242
|
+
- [x] refactor naming
|
|
239
243
|
|
|
240
244
|
#### 0.11
|
|
241
245
|
- [ ] enable/disable module cluster (to save space)
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
fastapi_voyager/__init__.py,sha256=tZy0Nkj8kTaMgbvHy-mGxVcFGVX0Km-36dnzsAIG2uk,230
|
|
2
2
|
fastapi_voyager/cli.py,sha256=kQb4g6JEGZR99e5r8LyFFEeb_-uT-n_gp_sDoYG3R7k,11118
|
|
3
|
-
fastapi_voyager/filter.py,sha256=
|
|
3
|
+
fastapi_voyager/filter.py,sha256=C718iwMjnnFXtqZISe9tzDRLAaY2FjbcE2LgkauEwnw,8095
|
|
4
4
|
fastapi_voyager/module.py,sha256=Z2QHNmiLk6ZAJlm2nSmO875Q33TweSg8UxZSzIpU9zY,3499
|
|
5
5
|
fastapi_voyager/render.py,sha256=sR1oUh8d3hhDalQhUcrL-k2ZYAWbLDGpGDOB0dDaqRQ,7804
|
|
6
6
|
fastapi_voyager/server.py,sha256=6kCj906N4PVpKbUI8eq7bJ4RoET1kIQgUQUf-oMFdSY,6326
|
|
7
7
|
fastapi_voyager/type.py,sha256=pWYKmgb9e0W_JeD7k54Mr2lxUZV_Ir9TNpewGRwHyHQ,1629
|
|
8
8
|
fastapi_voyager/type_helper.py,sha256=hjBC4E0tgBpQDlYxGg74uK07SXjsrAgictEETJfIpYM,9231
|
|
9
|
-
fastapi_voyager/version.py,sha256=
|
|
10
|
-
fastapi_voyager/voyager.py,sha256=
|
|
9
|
+
fastapi_voyager/version.py,sha256=Ly9dlTMt5hV5NpnQZMSH6dAdqe4rTuzydBQ4KMo8MJk,49
|
|
10
|
+
fastapi_voyager/voyager.py,sha256=r-_V0EPWwBM7N4hMlo-Si48mHVDc3zc9oGgTPCoEW_8,12377
|
|
11
11
|
fastapi_voyager/web/graph-ui.js,sha256=FmKA3eeHMEeUDNuay3f54_fv4eGHT7MT0TaGqXhyMWQ,4978
|
|
12
12
|
fastapi_voyager/web/graphviz.svg.css,sha256=zDCjjpT0Idufu5YOiZI76PL70-avP3vTyzGPh9M85Do,1563
|
|
13
13
|
fastapi_voyager/web/graphviz.svg.js,sha256=lvAdbjHc-lMSk4GQp-iqYA2PCFX4RKnW7dFaoe0LUHs,16005
|
|
14
|
-
fastapi_voyager/web/index.html,sha256=
|
|
14
|
+
fastapi_voyager/web/index.html,sha256=I41DH6WbfPgLGi49_1WFii9cldVIU8omQX13NulzaT0,15192
|
|
15
15
|
fastapi_voyager/web/quasar.min.css,sha256=F5jQe7X2XT54VlvAaa2V3GsBFdVD-vxDZeaPLf6U9CU,203145
|
|
16
16
|
fastapi_voyager/web/quasar.min.js,sha256=h0ftyPMW_CRiyzeVfQqiup0vrVt4_QWojpqmpnpn07E,502974
|
|
17
|
-
fastapi_voyager/web/vue-main.js,sha256=
|
|
17
|
+
fastapi_voyager/web/vue-main.js,sha256=ZPOS0lsJ-Pg4p8kqz8jScvJod1CqMXx5DjPIqkmGDpY,10251
|
|
18
18
|
fastapi_voyager/web/component/render-graph.js,sha256=e8Xgh2Kl-nYU0P1gstEmAepCgFnk2J6UdxW8TlMafGs,2322
|
|
19
19
|
fastapi_voyager/web/component/route-code-display.js,sha256=8NJPPjNRUC21gjpY8XYEQs4RBbhX1pCiqEhJp39ku6k,3678
|
|
20
20
|
fastapi_voyager/web/component/schema-code-display.js,sha256=UgFotzvqSuhnPXNOr6w_r1fV2_savRiCdokEvferutE,6244
|
|
@@ -26,8 +26,8 @@ fastapi_voyager/web/icon/favicon-16x16.png,sha256=JC07jEzfIYxBIoQn_FHXvyHuxESdhW
|
|
|
26
26
|
fastapi_voyager/web/icon/favicon-32x32.png,sha256=C7v1h58cfWOsiLp9yOIZtlx-dLasBcq3NqpHVGRmpt4,1859
|
|
27
27
|
fastapi_voyager/web/icon/favicon.ico,sha256=tZolYIXkkBcFiYl1A8ksaXN2VjGamzcSdes838dLvNc,15406
|
|
28
28
|
fastapi_voyager/web/icon/site.webmanifest,sha256=ep4Hzh9zhmiZF2At3Fp1dQrYQuYF_3ZPZxc1KcGBvwQ,263
|
|
29
|
-
fastapi_voyager-0.10.
|
|
30
|
-
fastapi_voyager-0.10.
|
|
31
|
-
fastapi_voyager-0.10.
|
|
32
|
-
fastapi_voyager-0.10.
|
|
33
|
-
fastapi_voyager-0.10.
|
|
29
|
+
fastapi_voyager-0.10.3.dist-info/METADATA,sha256=wLQ_TjppZDsfoKMa6MRgCWtjSN5oHfW1EIyumk8Ya1E,9000
|
|
30
|
+
fastapi_voyager-0.10.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
31
|
+
fastapi_voyager-0.10.3.dist-info/entry_points.txt,sha256=pEIKoUnIDXEtdMBq8EmXm70m16vELIu1VPz9-TBUFWM,53
|
|
32
|
+
fastapi_voyager-0.10.3.dist-info/licenses/LICENSE,sha256=lNVRR3y_bFVoFKuK2JM8N4sFaj3m-7j29kvL3olFi5Y,1067
|
|
33
|
+
fastapi_voyager-0.10.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|