nginx-lens 0.1.8__py3-none-any.whl → 0.1.9__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.
- commands/graph.py +3 -4
- commands/route.py +2 -1
- {nginx_lens-0.1.8.dist-info → nginx_lens-0.1.9.dist-info}/METADATA +1 -1
- {nginx_lens-0.1.8.dist-info → nginx_lens-0.1.9.dist-info}/RECORD +8 -8
- {nginx_lens-0.1.8.dist-info → nginx_lens-0.1.9.dist-info}/WHEEL +0 -0
- {nginx_lens-0.1.8.dist-info → nginx_lens-0.1.9.dist-info}/entry_points.txt +0 -0
- {nginx_lens-0.1.8.dist-info → nginx_lens-0.1.9.dist-info}/licenses/LICENSE +0 -0
- {nginx_lens-0.1.8.dist-info → nginx_lens-0.1.9.dist-info}/top_level.txt +0 -0
commands/graph.py
CHANGED
|
@@ -29,9 +29,8 @@ def graph(
|
|
|
29
29
|
# Для каждого server/location строим маршрут
|
|
30
30
|
def walk(d, chain, upstreams):
|
|
31
31
|
if d.get('block') == 'server':
|
|
32
|
-
srv = d.get('arg','') or '[no arg]'
|
|
33
32
|
for sub in d.get('directives', []):
|
|
34
|
-
walk(sub, chain + [('server',
|
|
33
|
+
walk(sub, chain + [('server', None)], upstreams)
|
|
35
34
|
elif d.get('block') == 'location':
|
|
36
35
|
loc = d.get('arg','')
|
|
37
36
|
for sub in d.get('directives', []):
|
|
@@ -81,10 +80,10 @@ def graph(
|
|
|
81
80
|
server_val = route[0][1]
|
|
82
81
|
server_block = None
|
|
83
82
|
for d in tree.directives:
|
|
84
|
-
if d.get('block') == 'server'
|
|
83
|
+
if d.get('block') == 'server':
|
|
85
84
|
server_block = d
|
|
86
85
|
break
|
|
87
|
-
label = get_server_label(server_block) if server_block else
|
|
86
|
+
label = get_server_label(server_block) if server_block else 'default'
|
|
88
87
|
server_file = server_block.get('__file__') if server_block else None
|
|
89
88
|
t.append(f"[", style="white")
|
|
90
89
|
t.append(f"server: {label}", style="bold blue")
|
commands/route.py
CHANGED
|
@@ -60,4 +60,5 @@ def route(
|
|
|
60
60
|
text += f"[bold]proxy_pass:[/bold] {proxy_pass}\n"
|
|
61
61
|
console.print(Panel(text, title="Route", style="green"))
|
|
62
62
|
return
|
|
63
|
-
|
|
63
|
+
search_dir = os.path.dirname(configs[0]) if configs else '/etc/nginx'
|
|
64
|
+
console.print(Panel(f"Маршрут для {url} не найден ни в одном .conf в {search_dir}", style="yellow"))
|
|
@@ -14,24 +14,24 @@ commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
14
14
|
commands/analyze.py,sha256=W6begSgXNjgKJGoGeguR3WKgHPLkClWXxxpDcqvsJdc,8343
|
|
15
15
|
commands/cli.py,sha256=9HwDJ-po5al0ceb4Wkyw5F2wzqxbJTo0CbHQ2AQ8obo,722
|
|
16
16
|
commands/diff.py,sha256=C7gRIWh6DNWHzjiQBPVTn-rZ40m2KCY75Zd6Q4URJIE,2076
|
|
17
|
-
commands/graph.py,sha256=
|
|
17
|
+
commands/graph.py,sha256=xB6KjXBkLmm5gII3e-5BMRGO7WeTwc7EFxRGzYgnme4,5947
|
|
18
18
|
commands/health.py,sha256=SuD2gOeMf9ZaoUfeqx1Nip0xQDBkDus6z872Fhw2Z9w,1682
|
|
19
19
|
commands/include.py,sha256=5PTYG5C00-AlWfIgpQXLq9E7C9yTFSv7HrZkM5ogDps,2224
|
|
20
20
|
commands/logs.py,sha256=RkPUdIpbO9dOVL56lemreYRuAjMjcqqMxRCKOFv2gC4,3691
|
|
21
|
-
commands/route.py,sha256=
|
|
21
|
+
commands/route.py,sha256=GzpHUqOwDOzhWlKcNf177Vq4OB6g--_8npZXPMDRNGg,3034
|
|
22
22
|
commands/syntax.py,sha256=ZWFdaL8LVv9S694wlk2aV3HJKb0OSKjw3wNgTlNvFR8,3418
|
|
23
23
|
commands/tree.py,sha256=mDfx0Aeg1EDQSYQoJ2nJIkSd_uP7ZR7pEqy7Cw3clQ0,2161
|
|
24
24
|
exporter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
exporter/graph.py,sha256=WYUrqUgCaK6KihgxAcRHaQn4oMo6b7ybC8yb_36ZIsA,3995
|
|
26
26
|
exporter/html.py,sha256=uquEM-WvBt2aV9GshgaI3UVhYd8sD0QQ-OmuNtvYUdU,798
|
|
27
27
|
exporter/markdown.py,sha256=_0mXQIhurGEZ0dO-eq9DbsuKNrgEDIblgtL3DAgYNo8,724
|
|
28
|
-
nginx_lens-0.1.
|
|
28
|
+
nginx_lens-0.1.9.dist-info/licenses/LICENSE,sha256=g8QXKdvZZC56rU8E12vIeYF6R4jeTWOsblOnYAda3K4,1073
|
|
29
29
|
parser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
30
|
parser/nginx_parser.py,sha256=Sa9FtGAkvTqNzoehBvgLUWPJHLLIZYWH9ugSHW50X8s,3699
|
|
31
31
|
upstream_checker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
upstream_checker/checker.py,sha256=9-6CMUTN7gXUACP8EwX722QogfujZyV-WWWUeM3a79k,455
|
|
33
|
-
nginx_lens-0.1.
|
|
34
|
-
nginx_lens-0.1.
|
|
35
|
-
nginx_lens-0.1.
|
|
36
|
-
nginx_lens-0.1.
|
|
37
|
-
nginx_lens-0.1.
|
|
33
|
+
nginx_lens-0.1.9.dist-info/METADATA,sha256=QzOKmE5929PAk0mSjFEH7xVF2DXXQxdGq-eAsaZSxfw,520
|
|
34
|
+
nginx_lens-0.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
35
|
+
nginx_lens-0.1.9.dist-info/entry_points.txt,sha256=qEcecjSyLqcJjbIVlNlTpqAhPqDyaujUV5ZcBTAr3po,48
|
|
36
|
+
nginx_lens-0.1.9.dist-info/top_level.txt,sha256=mxLJO4rZg0rbixVGhplF3fUNFs8vxDIL25ronZNvRy4,51
|
|
37
|
+
nginx_lens-0.1.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|