diff options
author | maxbr <maxbr@mi.fu-berlin.de> | 2016-07-29 12:43:43 +0200 |
---|---|---|
committer | Max Breitenfeldt <max.breitenfeldt@gmail.com> | 2016-07-29 11:25:20 +0000 |
commit | 35c34c690ae9616d791c39fa218fe1621fa8d8d2 (patch) | |
tree | 6168caaeb4be9144ed6bfde0150850d6559c8b6f /tools/pharos-dashboard/dashboard/migrations | |
parent | 7ae1f204de947a3c12804c04f32e20d45eb99eba (diff) |
import pharos dashboard code
JIRA: RELENG-12
The last commit was missing some JS/CSS dependencies of the site. This
happened because they are in folders that are named 'build' or 'dist'.
This commit adds a bower.json file, that specifies dependencies.
Dependencies can now be installed by running 'bower install' in the
dashboard/static folder.
Change-Id: I054f319c66771f767e97711cb678d79d3bd6bee4
Signed-off-by: maxbr <maxbr@mi.fu-berlin.de>
Diffstat (limited to 'tools/pharos-dashboard/dashboard/migrations')
-rw-r--r-- | tools/pharos-dashboard/dashboard/migrations/0001_initial.py | 107 | ||||
-rw-r--r-- | tools/pharos-dashboard/dashboard/migrations/__init__.py | 0 |
2 files changed, 107 insertions, 0 deletions
diff --git a/tools/pharos-dashboard/dashboard/migrations/0001_initial.py b/tools/pharos-dashboard/dashboard/migrations/0001_initial.py new file mode 100644 index 00000000..12de299e --- /dev/null +++ b/tools/pharos-dashboard/dashboard/migrations/0001_initial.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.8 on 2016-07-24 13:06 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Booking', + fields=[ + ('booking_id', models.AutoField(primary_key=True, serialize=False)), + ('start_date_time', models.DateTimeField()), + ('end_date_time', models.DateTimeField()), + ('creation', models.DateTimeField(auto_now=True)), + ('purpose', models.CharField(max_length=300)), + ], + options={ + 'db_table': 'booking', + }, + ), + migrations.CreateModel( + name='Pod', + fields=[ + ('pod_id', models.AutoField(primary_key=True, serialize=False)), + ('chassis', models.CharField(blank=True, max_length=500, null=True)), + ], + options={ + 'db_table': 'pod', + }, + ), + migrations.CreateModel( + name='Resource', + fields=[ + ('resource_id', models.AutoField( + primary_key=True, serialize=False)), + ('name', models.CharField(max_length=100, unique=True)), + ('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)), + ], + options={ + 'db_table': 'resource', + }, + ), + migrations.CreateModel( + name='Server', + fields=[ + ('server_id', models.AutoField(primary_key=True, serialize=False)), + ('model', models.CharField(blank=True, max_length=200, null=True)), + ('cpu', models.CharField(blank=True, max_length=200, null=True)), + ('ram', models.CharField(blank=True, max_length=200, null=True)), + ('storage', models.CharField(blank=True, max_length=200, null=True)), + ('count', models.IntegerField(default=1)), + ('resource', models.ForeignKey( + on_delete=django.db.models.deletion.DO_NOTHING, to='dashboard.Resource')), + ], + options={ + 'db_table': 'server', + }, + ), + migrations.CreateModel( + name='UserResource', + fields=[ + ('user_resource_id', models.AutoField( + primary_key=True, serialize=False)), + ('resource', models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, to='dashboard.Resource')), + ('user', models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'db_table': 'user_resource', + }, + ), + migrations.AddField( + model_name='pod', + name='resource', + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, to='dashboard.Resource'), + ), + migrations.AddField( + model_name='booking', + name='resource', + field=models.ForeignKey( + on_delete=django.db.models.deletion.PROTECT, to='dashboard.Resource'), + ), + migrations.AddField( + model_name='booking', + name='user', + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/tools/pharos-dashboard/dashboard/migrations/__init__.py b/tools/pharos-dashboard/dashboard/migrations/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/tools/pharos-dashboard/dashboard/migrations/__init__.py |