Skip to content

Commit

Permalink
replace tempodominus by daterangepicker
Browse files Browse the repository at this point in the history
fix hmi migration
add logrotate config file
add loading screen
other fixes
  • Loading branch information
clavay committed Feb 17, 2022
1 parent 96f4a53 commit c7fc68b
Show file tree
Hide file tree
Showing 7 changed files with 272 additions and 200 deletions.
10 changes: 10 additions & 0 deletions extras/pyscada-logrotate
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/var/log/pyscada_debug.log
{
rotate 4
weekly
missingok
notifempty
compress
delaycompress
size 1M
}
13 changes: 8 additions & 5 deletions pyscada/hmi/migrations/0056_auto_20211210_1608.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ def add_height_width(apps, schema_editor):
if str(item.url_height) == '100' and str(item.url_width) == '100':
if hasattr(settings, 'MEDIA_ROOT'):
file_path = str(settings.MEDIA_ROOT) + str(item.background_image.name)
img = Image.open(file_path)
item.url_height = int(img.height)
item.url_width = int(img.width)
item.save()
count += 1
try:
img = Image.open(file_path)
item.url_height = int(img.height)
item.url_width = int(img.width)
item.save()
count += 1
except:
pass

logger.info('changed %d ProcessFlowDiagram\n' % count)

Expand Down
Loading

0 comments on commit c7fc68b

Please sign in to comment.