From 882c03a4160f9fe8f89505cf79424f64e3b31970 Mon Sep 17 00:00:00 2001 From: Marc Aymerich Date: Thu, 26 Mar 2015 16:00:44 +0000 Subject: [PATCH] Added seafile incon andn fixed random bugs --- orchestra/apps/saas/services/seafile.py | 31 ++++++++ .../static/orchestra/icons/apps/seafile.png | Bin 0 -> 2604 bytes .../static/orchestra/icons/apps/seafile.svg | 68 ++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 orchestra/apps/saas/services/seafile.py create mode 100644 orchestra/static/orchestra/icons/apps/seafile.png create mode 100644 orchestra/static/orchestra/icons/apps/seafile.svg diff --git a/orchestra/apps/saas/services/seafile.py b/orchestra/apps/saas/services/seafile.py new file mode 100644 index 00000000..951114a5 --- /dev/null +++ b/orchestra/apps/saas/services/seafile.py @@ -0,0 +1,31 @@ +from django import forms +from django.core.exceptions import ValidationError +from django.utils.translation import ugettext_lazy as _ +from rest_framework import serializers + +from .. import settings +from .options import SoftwareService, SoftwareServiceForm + + +# TODO monitor quota since out of sync? + +class SeaFileForm(SoftwareServiceForm): + email = forms.EmailField(label=_("Email"), widget=forms.TextInput(attrs={'size':'40'})) + quota = forms.IntegerField(label=_("Quota"), initial=settings.SAAS_SEAFILE_DEFAULT_QUOTA, + help_text=_("Disk quota in MB.")) + + +class SeaFileDataSerializer(serializers.Serializer): + email = serializers.EmailField(label=_("Email")) + quota = serializers.IntegerField(label=_("Quota"), default=settings.SAAS_SEAFILE_DEFAULT_QUOTA, + help_text=_("Disk quota in MB.")) + + +class SeaFileService(SoftwareService): + name = 'seafile' + verbose_name = "SeaFile" + form = SeaFileForm + serializer = SeaFileDataSerializer + icon = 'orchestra/icons/apps/seafile.png' + site_domain = settings.SAAS_SEAFILE_DOMAIN + change_readonly_fileds = ('email',) diff --git a/orchestra/static/orchestra/icons/apps/seafile.png b/orchestra/static/orchestra/icons/apps/seafile.png new file mode 100644 index 0000000000000000000000000000000000000000..cbcd3effd2c2eff37ab3931223aa365c1d5de4a3 GIT binary patch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