Commit c7c42b4c authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB

Delete userprofile app and move functionality to alerts app

parent a119a293
......@@ -326,7 +326,6 @@ INSTALLED_APPS = [
'ligoauth',
'search',
'superevents',
'userprofile',
'rest_framework',
'guardian',
'django_twilio',
......@@ -580,11 +579,6 @@ LOGGING = {
'propagate': True,
'level': LOG_LEVEL,
},
'userprofile': {
'handlers': ['debug_file','error_file'],
'propagate': True,
'level': LOG_LEVEL,
},
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
......
......@@ -33,7 +33,7 @@ urlpatterns = [
template_name='discovery.html'), name="discovery"),
url(r'^events/', include('events.urls')),
url(r'^superevents/', include('superevents.urls')),
url(r'^options/', include('userprofile.urls')),
url(r'^options/', include('alerts.urls')),
url(r'^feeds/(?P<url>.*)/$', EventFeed()),
url(r'^feeds/$', feedview, name="feeds"),
......
......@@ -18,7 +18,7 @@ from events.permission_utils import is_external
from events.shortcuts import is_event
from search.query.labels import filter_for_labels
from superevents.shortcuts import is_superevent
from userprofile.models import Contact
from .models import Contact
from .email import issue_email_alerts
from .phone import issue_phone_alerts
from .xmpp import issue_xmpp_alerts
......
......@@ -4,7 +4,7 @@ from django.conf import settings
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand, CommandError
from userprofile.models import Contact, Trigger
from alerts.models import Contact, Trigger
class Command(BaseCommand):
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11.18 on 2019-01-17 20:11
from __future__ import unicode_literals
import alerts.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('events', '0031_hwinj_labels'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Contact',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('desc', models.CharField(max_length=20)),
('email', models.EmailField(blank=True, max_length=254)),
('phone', alerts.models.PhoneNumberField(blank=True, max_length=255, validators=[alerts.models.validate_phone])),
('call_phone', models.BooleanField(default=False)),
('text_phone', models.BooleanField(default=False)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Trigger',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('triggerType', models.CharField(blank=True, choices=[(b'create', b'create'), (b'change', b'change'), (b'label', b'label')], max_length=20)),
('farThresh', models.FloatField(blank=True, null=True)),
('label_query', models.CharField(blank=True, max_length=100)),
('contacts', models.ManyToManyField(to='alerts.Contact')),
('labels', models.ManyToManyField(blank=True, to='events.Label')),
('pipelines', models.ManyToManyField(blank=True, to='events.Pipeline')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
]
......@@ -5,7 +5,7 @@ from django.contrib.auth.models import Group as AuthGroup
from django.urls import reverse
from core.tests.utils import GraceDbTestBase
from userprofile.models import Contact, Trigger
from alerts.models import Contact, Trigger
class TestIndexView(GraceDbTestBase):
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('events', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Contact',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('desc', models.CharField(max_length=20)),
('email', models.EmailField(max_length=75)),
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Trigger',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('triggerType', models.CharField(blank=True, max_length=20, choices=[(b'create', b'create'), (b'change', b'change'), (b'label', b'label')])),
('farThresh', models.FloatField(null=True, blank=True)),
('contacts', models.ManyToManyField(to='userprofile.Contact', blank=True)),
('labels', models.ManyToManyField(to='events.Label', blank=True)),
('pipelines', models.ManyToManyField(to='events.Pipeline', blank=True)),
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
],
options={
},
bases=(models.Model,),
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('userprofile', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='contact',
name='email',
field=models.EmailField(max_length=254),
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('userprofile', '0002_alter_email_field_length'),
]
operations = [
migrations.AddField(
model_name='trigger',
name='label_query',
field=models.CharField(max_length=100, blank=True),
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import userprofile.models
class Migration(migrations.Migration):
dependencies = [
('userprofile', '0003_trigger_label_query'),
]
operations = [
migrations.AddField(
model_name='contact',
name='phone',
field=userprofile.models.PhoneNumberField(blank=True, max_length=255, validators=[userprofile.models.validate_phone, userprofile.models.validate_phone, userprofile.models.validate_phone]),
),
migrations.AlterField(
model_name='contact',
name='email',
field=models.EmailField(max_length=254, blank=True),
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import userprofile.models
class Migration(migrations.Migration):
dependencies = [
('userprofile', '0004_add_contact_phone_number'),
]
operations = [
migrations.AddField(
model_name='contact',
name='call_phone',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='contact',
name='text_phone',
field=models.BooleanField(default=False),
),
migrations.AlterField(
model_name='contact',
name='phone',
field=userprofile.models.PhoneNumberField(blank=True, max_length=255, validators=[userprofile.models.validate_phone]),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-18 17:15
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('userprofile', '0005_separate_call_and_text_alerts'),
]
operations = [
migrations.AlterField(
model_name='trigger',
name='contacts',
field=models.ManyToManyField(to='userprofile.Contact'),
),
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment