Commit 60d652eec23efc58ee776487ec7ba9d2baca785a

Authored by Василь Свідрик
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
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
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
... ... @@ -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 # Відкриття файлу у режимі дозапису
... ... @@ -13,6 +13,7 @@
13 13 flask-babel==3.1.0
14 14 Flask-Bcrypt==1.0.1
15 15 Flask-Cors==3.0.10
  16 +Flask-JWT-Extended==4.5.2
16 17 Flask-Login==0.6.2
17 18 Flask-Migrate==4.0.4
18 19 Flask-MySQLdb==1.0.1
... ... @@ -32,6 +33,7 @@
32 33 mysqlclient==2.1.1
33 34 peppercorn==0.6
34 35 protobuf==3.20.3
  36 +PyJWT==2.7.0
35 37 python-engineio==4.4.1
36 38 python-socketio==5.8.0
37 39 pytz==2023.3
... ... @@ -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='/')