From 1e974b185d2caff288d73356220e1096910f9b96 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Sat, 27 Jan 2024 11:26:24 +0100 Subject: DS and Graph paths are not limited to existing files --- .../0002_alter_dashboard_groups_read_and_more.py | 123 +++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 rrd/migrations/0002_alter_dashboard_groups_read_and_more.py (limited to 'rrd/migrations') diff --git a/rrd/migrations/0002_alter_dashboard_groups_read_and_more.py b/rrd/migrations/0002_alter_dashboard_groups_read_and_more.py new file mode 100644 index 0000000..bc1c863 --- /dev/null +++ b/rrd/migrations/0002_alter_dashboard_groups_read_and_more.py @@ -0,0 +1,123 @@ +# Generated by Django 4.2.9 on 2024-01-27 10:24 + +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ("auth", "0012_alter_user_first_name_max_length"), + ("rrd", "0001_initial"), + ] + + operations = [ + migrations.AlterField( + model_name="dashboard", + name="groups_read", + field=models.ManyToManyField( + related_name="%(class)s_read", to="auth.group" + ), + ), + migrations.AlterField( + model_name="dashboard", + name="groups_write", + field=models.ManyToManyField( + related_name="%(class)s_write", to="auth.group" + ), + ), + migrations.AlterField( + model_name="dashboard", + name="users_read", + field=models.ManyToManyField( + related_name="%(class)s_read", to=settings.AUTH_USER_MODEL + ), + ), + migrations.AlterField( + model_name="dashboard", + name="users_write", + field=models.ManyToManyField( + related_name="%(class)s_write", to=settings.AUTH_USER_MODEL + ), + ), + migrations.AlterField( + model_name="datasource", + name="groups_read", + field=models.ManyToManyField( + related_name="%(class)s_read", to="auth.group" + ), + ), + migrations.AlterField( + model_name="datasource", + name="groups_write", + field=models.ManyToManyField( + related_name="%(class)s_write", to="auth.group" + ), + ), + migrations.AlterField( + model_name="datasource", + name="path", + field=models.CharField(max_length=512), + ), + migrations.AlterField( + model_name="datasource", + name="rrd_config", + field=models.TextField( + default="\nDS:{ds_name}:GAUGE:600:U:U\nRRA:AVERAGE:0.5:1:2016\nRRA:AVERAGE:0.5:12:720\nRRA:MAX:0.5:288:365\nRRA:MIN:0.5:288:365\n" + ), + ), + migrations.AlterField( + model_name="datasource", + name="users_read", + field=models.ManyToManyField( + related_name="%(class)s_read", to=settings.AUTH_USER_MODEL + ), + ), + migrations.AlterField( + model_name="datasource", + name="users_write", + field=models.ManyToManyField( + related_name="%(class)s_write", to=settings.AUTH_USER_MODEL + ), + ), + migrations.AlterField( + model_name="graph", + name="groups_read", + field=models.ManyToManyField( + related_name="%(class)s_read", to="auth.group" + ), + ), + migrations.AlterField( + model_name="graph", + name="groups_write", + field=models.ManyToManyField( + related_name="%(class)s_write", to="auth.group" + ), + ), + migrations.AlterField( + model_name="graph", + name="path", + field=models.CharField(max_length=512), + ), + migrations.AlterField( + model_name="graph", + name="rrd_config", + field=models.TextField( + default="\n--imgformat\n PNG\n--width\n 800\n--height\n 200\n--start\n -86400\n--end\n -1\n--vertical-label\n {ds_names[0]}\n--title\n {title}\n--right-axis\n 1:0\n--alt-autoscale\nDEF:{ds_names[0]}={ds_paths[0]}:{ds_names[0]}:AVERAGE\nVDEF:max={ds_names[0]},MAXIMUM\nVDEF:min={ds_names[0]},MINIMUM\nLINE2:{ds_names[0]}#0000FF\nLINE1:max#FF0000\nLINE1:min#FF0000\n" + ), + ), + migrations.AlterField( + model_name="graph", + name="users_read", + field=models.ManyToManyField( + related_name="%(class)s_read", to=settings.AUTH_USER_MODEL + ), + ), + migrations.AlterField( + model_name="graph", + name="users_write", + field=models.ManyToManyField( + related_name="%(class)s_write", to=settings.AUTH_USER_MODEL + ), + ), + ] -- cgit v1.2.3