mirror of
https://github.com/Justuser3310/jetwork.git
synced 2025-02-08 01:37:38 +00:00
Compare commits
No commits in common. "ccb88adcb4a559e29a89427d5dfed0561b081334" and "cca41a5d7a25aea36bf4b70020d273e4e90430e6" have entirely different histories.
ccb88adcb4
...
cca41a5d7a
2
db.py
2
db.py
@ -2,7 +2,7 @@ import os
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
if not os.path.exists('config.json'):
|
if not os.path.exists('config.json'):
|
||||||
db = {"our_port": 0000, "ports": [], "domain": "http://127.0.0.1:8000"}
|
db = {}
|
||||||
js = json.dumps(db, indent=2)
|
js = json.dumps(db, indent=2)
|
||||||
with open("config.json", "w") as outfile:
|
with open("config.json", "w") as outfile:
|
||||||
outfile.write(js)
|
outfile.write(js)
|
||||||
|
@ -38,17 +38,13 @@ def update_servers(n):
|
|||||||
Input('interval-component', 'n_intervals'),
|
Input('interval-component', 'n_intervals'),
|
||||||
Input('search', 'value'))
|
Input('search', 'value'))
|
||||||
def update_sites(n, s_val):
|
def update_sites(n, s_val):
|
||||||
# Домен по умолчанию
|
|
||||||
domain = read()['domain']
|
|
||||||
# Если есть элемент в поиске
|
# Если есть элемент в поиске
|
||||||
if s_val:
|
if s_val:
|
||||||
return html.Div([ dcc.Link(children=i, href=f'{domain}/{s_val}',
|
return html.Div([s_val], className='sites_elem')
|
||||||
target='_blank') ], className='sites_elem')
|
|
||||||
|
|
||||||
res = []
|
res = []
|
||||||
for i in next(walk('cached/'), (None, None, []))[1]:
|
for i in next(walk('cached/'), (None, None, []))[1]:
|
||||||
res.append(html.Div([ dcc.Link(children=i, href=f'{domain}/{i}',
|
res.append(html.Div([i], className='sites_elem'))
|
||||||
target='_blank') ], className='sites_elem'))
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
# Обновление доступных сайтов в поиске
|
# Обновление доступных сайтов в поиске
|
||||||
|
Loading…
Reference in New Issue
Block a user