diff options
author | 2016-08-19 17:11:58 +0200 | |
---|---|---|
committer | 2016-08-19 17:11:58 +0200 | |
commit | 66eb4d851e63d20031502ec0c96aaabe34c6fd32 (patch) | |
tree | 98248b6faf6b3c742efef258e34f06cc92d1a888 /tools/pharos-dashboard/dashboard/migrations | |
parent | 3b5ef3b0a88247eeafeee878de528aad71f9fd4b (diff) |
Implement periodic tasks
JIRA: RELENG-12
The dashboard is now querying jenkins periodically and saving the
results in the database. This fixes delays that were caused by calling
the jenkins API.
Signed-off-by: maxbr <maxbr@mi.fu-berlin.de>
Diffstat (limited to 'tools/pharos-dashboard/dashboard/migrations')
5 files changed, 105 insertions, 3 deletions
diff --git a/tools/pharos-dashboard/dashboard/migrations/0001_initial.py b/tools/pharos-dashboard/dashboard/migrations/0001_initial.py index b93d8290..6343b463 100644 --- a/tools/pharos-dashboard/dashboard/migrations/0001_initial.py +++ b/tools/pharos-dashboard/dashboard/migrations/0001_initial.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.10 on 2016-08-12 09:51 +# Generated by Django 1.10 on 2016-08-15 12:19 from __future__ import unicode_literals +from django.conf import settings from django.db import migrations, models @@ -10,6 +11,7 @@ class Migration(migrations.Migration): initial = True dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ @@ -21,11 +23,18 @@ class Migration(migrations.Migration): ('slavename', models.CharField(blank=True, max_length=50, null=True)), ('description', models.CharField(blank=True, max_length=300, null=True)), ('url', models.CharField(blank=True, max_length=100, null=True)), - ('bookable', models.BooleanField(default=False)), - ('active', models.BooleanField(default=True)), + ('owners', models.ManyToManyField(to=settings.AUTH_USER_MODEL)), ], options={ 'db_table': 'resource', }, ), + migrations.CreateModel( + name='ResourceUtilization', + fields=[ + ('timestamp', models.DateTimeField(auto_created=True)), + ('id', models.AutoField(primary_key=True, serialize=False)), + ('pod_status', models.IntegerField()), + ], + ), ] diff --git a/tools/pharos-dashboard/dashboard/migrations/0002_auto_20160815_1511.py b/tools/pharos-dashboard/dashboard/migrations/0002_auto_20160815_1511.py new file mode 100644 index 00000000..67822a72 --- /dev/null +++ b/tools/pharos-dashboard/dashboard/migrations/0002_auto_20160815_1511.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2016-08-15 15:11 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('jenkins', '0002_auto_20160815_1226'), + ('dashboard', '0001_initial'), + ] + + operations = [ + migrations.RemoveField( + model_name='resource', + name='slavename', + ), + migrations.AddField( + model_name='resource', + name='slave', + field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.DO_NOTHING, to='jenkins.JenkinsSlave'), + preserve_default=False, + ), + ] diff --git a/tools/pharos-dashboard/dashboard/migrations/0003_auto_20160815_1512.py b/tools/pharos-dashboard/dashboard/migrations/0003_auto_20160815_1512.py new file mode 100644 index 00000000..53b4fcd4 --- /dev/null +++ b/tools/pharos-dashboard/dashboard/migrations/0003_auto_20160815_1512.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2016-08-15 15:12 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0002_auto_20160815_1511'), + ] + + operations = [ + migrations.RemoveField( + model_name='resource', + name='slave', + ), + migrations.AddField( + model_name='resource', + name='slavename', + field=models.CharField(blank=True, max_length=50, null=True), + ), + ] diff --git a/tools/pharos-dashboard/dashboard/migrations/0004_resource_slave.py b/tools/pharos-dashboard/dashboard/migrations/0004_resource_slave.py new file mode 100644 index 00000000..82d45f0b --- /dev/null +++ b/tools/pharos-dashboard/dashboard/migrations/0004_resource_slave.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2016-08-15 15:13 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('jenkins', '0002_auto_20160815_1226'), + ('dashboard', '0003_auto_20160815_1512'), + ] + + operations = [ + migrations.AddField( + model_name='resource', + name='slave', + field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.DO_NOTHING, to='jenkins.JenkinsSlave'), + preserve_default=False, + ), + ] diff --git a/tools/pharos-dashboard/dashboard/migrations/0005_remove_resource_slavename.py b/tools/pharos-dashboard/dashboard/migrations/0005_remove_resource_slavename.py new file mode 100644 index 00000000..339f8c3f --- /dev/null +++ b/tools/pharos-dashboard/dashboard/migrations/0005_remove_resource_slavename.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2016-08-15 15:17 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0004_resource_slave'), + ] + + operations = [ + migrations.RemoveField( + model_name='resource', + name='slavename', + ), + ] |