Commit 60d652eec23efc58ee776487ec7ba9d2baca785a
1 parent
9045d204d9
fix turm off component
Showing 15 changed files with 7 additions and 4 deletions Side-by-side Diff
- __pycache__/main.cpython-310.pyc
- __pycache__/routes.cpython-310.pyc
- components/__pycache__/__init__.cpython-310.pyc
- components/k2test/__pycache__/__init__.cpython-310.pyc
- components/k2test/k2test/__pycache__/__init__.cpython-310.pyc
- components/k2test/k2test/__pycache__/views.cpython-310.pyc
- db/database.db
- k2/__pycache__/__init__.cpython-310.pyc
- k2/__pycache__/k2cfg.cpython-310.pyc
- k2/__pycache__/k2comp.cpython-310.pyc
- k2/__pycache__/k2obj.cpython-310.pyc
- k2/__pycache__/k2rout.cpython-310.pyc
- k2/k2rout.py
- requirements.txt
- routes.py
__pycache__/main.cpython-310.pyc
No preview for this file type
__pycache__/routes.cpython-310.pyc
No preview for this file type
components/__pycache__/__init__.cpython-310.pyc
No preview for this file type
components/k2test/__pycache__/__init__.cpython-310.pyc
No preview for this file type
components/k2test/k2test/__pycache__/__init__.cpython-310.pyc
No preview for this file type
components/k2test/k2test/__pycache__/views.cpython-310.pyc
No preview for this file type
db/database.db
No preview for this file type
k2/__pycache__/__init__.cpython-310.pyc
No preview for this file type
k2/__pycache__/k2cfg.cpython-310.pyc
No preview for this file type
k2/__pycache__/k2comp.cpython-310.pyc
No preview for this file type
k2/__pycache__/k2obj.cpython-310.pyc
No preview for this file type
k2/__pycache__/k2rout.cpython-310.pyc
No preview for this file type
k2/k2rout.py
| ... | ... | @@ -347,9 +347,9 @@ |
| 347 | 347 | return 'Component not found <meta http-equiv="refresh" content="1;url=/dashboard" />' |
| 348 | 348 | #remove menu items |
| 349 | 349 | component_name = component.name |
| 350 | - file_path = "components/menu.yml" | |
| 351 | - remove_from_yaml_file(file_path, component_name) | |
| 352 | - | |
| 350 | + #file_path = "components/menu.yml" | |
| 351 | + #remove_from_yaml_file(file_path, component_name) | |
| 352 | + requests.get(f"{k2.domain}api/add-to-menu") | |
| 353 | 353 | # remove routes |
| 354 | 354 | file_path = 'routes.py' |
| 355 | 355 | with open(file_path, 'r') as file: |
| ... | ... | @@ -372,7 +372,6 @@ |
| 372 | 372 | if not component: |
| 373 | 373 | return 'Component not found <meta http-equiv="refresh" content="1;url=/dashboard" />' |
| 374 | 374 | |
| 375 | - # Шлях до файлу, з якого потрібно видалити залежності | |
| 376 | 375 | file_path = 'routes.py' |
| 377 | 376 | code = component.dependencies |
| 378 | 377 | # Відкриття файлу у режимі дозапису |
requirements.txt
| ... | ... | @@ -13,6 +13,7 @@ |
| 13 | 13 | f l a s k - b a b e l = = 3 . 1 . 0 |
| 14 | 14 | F l a s k - B c r y p t = = 1 . 0 . 1 |
| 15 | 15 | F l a s k - C o r s = = 3 . 0 . 1 0 |
| 16 | + F l a s k - J W T - E x t e n d e d = = 4 . 5 . 2 | |
| 16 | 17 | F l a s k - L o g i n = = 0 . 6 . 2 |
| 17 | 18 | F l a s k - M i g r a t e = = 4 . 0 . 4 |
| 18 | 19 | F l a s k - M y S Q L d b = = 1 . 0 . 1 |
| ... | ... | @@ -32,6 +33,7 @@ |
| 32 | 33 | m y s q l c l i e n t = = 2 . 1 . 1 |
| 33 | 34 | p e p p e r c o r n = = 0 . 6 |
| 34 | 35 | p r o t o b u f = = 3 . 2 0 . 3 |
| 36 | + P y J W T = = 2 . 7 . 0 | |
| 35 | 37 | p y t h o n - e n g i n e i o = = 4 . 4 . 1 |
| 36 | 38 | p y t h o n - s o c k e t i o = = 5 . 8 . 0 |
| 37 | 39 | p y t z = = 2 0 2 3 . 3 |
routes.py
| ... | ... | @@ -4,4 +4,8 @@ |
| 4 | 4 | app.register_blueprint(components_bp) |
| 5 | 5 | from components.k2test.k2test.views import k2test |
| 6 | 6 | app.register_blueprint(k2test, url_prefix='/k2test') |
| 7 | +from components.grid.grid.views import grid | |
| 8 | +app.register_blueprint(grid, url_prefix='/grid') | |
| 9 | +from components.vue.vue.views import vue2 | |
| 10 | +app.register_blueprint(vue2, url_prefix='/') |